I have set the capabilities as described in first example here. For simplicity I also include the example below.
File app = new File("The absolute or relative path to an *.app, *.zip or ipa file");
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "iPhone Simulator");
capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, "The_target_version");
//The_target_version is the supported iOS version, e.g. 8.1, 8.2, 9.2 etc
capabilities.setCapability(MobileCapabilityType.APP, app.getAbsolutePath());
//you are free to set additional capabilities
AppiumDriver<MobileElement> driver = new IOSDriver<>(
new URL("http://target_ip:used_port/wd/hub"), //if it needs to use locally started server
//then the target_ip is 127.0.0.1 or 0.0.0.0
//the default port is 4723
capabilities);
The values I set are included in the log (in first post). The example does not mention anything about including UDID, so I have not included it.
From this line in the log it looks like appium can findout the UDID (73e0249e89baa62aedcb0372afe7048debf492a6) automatically.
[debug] [Instruments] Available devices: iPad (3) (9.2) [73e0249e89baa62aedcb0372afe7048debf492a6],Apple TV 1080p (9.2) [716A9793-2C75-4F0E-B428-E09327174AAD] (Simulator),iPad 2 (9.3) [16E8F890-AA8A-4058-8569-44C67020A999] (Simulator),iPad Air (9.3) [8BD4DFC9-15A7-4E09-A111-98D6F74A079D] (Simulator),iPad Air 2 (9.3) [4221A047-57AE-4540-B285-A8449AF5DDD6] (Simulator),iPad Pro (9.3) [AFC6C6EB-85AB-4470-A232-ABF0137C6372] (Simulator),iPad Retina (9.3) [9061EA80-464A-4E78-BEAF-BA9DC180EE60] (Simulator),iPhone 4s (9.3) [7E54CA35-CA47-45BB-8636-061C3063C89A] (Simulator),iPhone 5 (9.3) [4F51A194-C301-45EF-875A-75A5CC1219A8] (Simulator),iPhone 5s (9.3) [F66569F6-0C86-4BE0-9E03-A2E0D19D1CDB] (Simulator),iPhone 6 (9.3) [68561860-9DCB-4CEC-843F-FBC294831DA0] (Simulator),iPhone 6 Plus (9.3) [46475135-553E-4F36-B5D0-E801734BCBE8] (Simulator),iPhone 6s (9.3) [4D493C1A-EF17-4AA9-9282-38CBBE92A292] (Simulator),iPhone 6s (9.3) + Apple Watch - 38mm (2.2) [10F2C96D-DA57-4326-B442-11115959BBFF] (Simulator),iPhone 6s Plus (9.3) [65C104FA-8BEB-42A2-AE56-80B65854E3E2] (Simulator),iPhone 6s Plus (9.3) + Apple Watch - 42mm (2.2) [B8985BDD-B852-4EE9-A8C3-A04EFD8C4430] (Simulator)
Is it necessary to include the UDID as well? I will try including it tomorrow morning.
Is it correct to set: deviceName: 'iPad (3)' ?