Mac OSX Mavericks
Appium.app 1.3.3
Xcode 6.1
PROBLEM: Whenever Appium physically launches the simulator all of my iOS simulator devices are deleted, except the iOS sim described in desired_caps (the sim Appium physically launches)
- Open Xcode
- Observe I only have iPhone6 iOS8.1 simulator available to run my project on
- Click Window > Devices and observe I only I only have iPhone6 iOS8.1 available, all of my other devices are missing
- Manually create one or more additional devices, such as iPhone 4S iOS7.1
- Can successfully launch my app on the newly created sims directly from Xcode without any problem
- Can exit / restart Xcode, and all of the sims are still physically present, still no issues
- Open Appium.app with iPhone 6 iOS8.1 with prelaunch enabled
- Correct sim is successfully launched
- Open Xcode and observe all of my other sims have been removed
This appears to be the pertinent details from the Appium.app log:
2014-12-04 15:38:10:198 - info: [debug] Final device string is: āiPhone 6 (8.1 Simulator)ā
2014-12-04 15:38:10:199 - info: [debug] Parsed app Info.plist (as binary)
2014-12-04 15:38:10:217 - info: [debug] Wrote new app Info.plist with device type
2014-12-04 15:38:10:217 - info: [debug] Checking whether we need to set app preferences
2014-12-04 15:38:10:217 - info: [debug] Running ios sim reset flow
2014-12-04 15:38:10:217 - info: [debug] Killing the simulator process
2014-12-04 15:38:10:218 - info: [debug] Killall iOS Simulator
2014-12-04 15:38:10:219 - info: [debug] Killing any other simulator daemons
2014-12-04 15:38:10:244 - info: [debug] Cleaning sim data files
2014-12-04 15:38:10:245 - info: [debug] Executing: xcrun simctl erase 9C0D7887-CCD5-4A1A-BEBA-E079FBE1663E
2014-12-04 15:38:11:153 - info: [debug] Cleaning app data files
2014-12-04 15:38:11:154 - warn: Applications directory /Users/chrigrah/Library/Developer/CoreSimulator/Devices/9C0D7887-CCD5-4A1A-BEBA-E079FBE1663E/data/Applications doesnāt exist. Have you run this simulator before?
2014-12-04 15:38:11:154 - info: Couldnāt find app directories to delete. Probably itās not installed
2014-12-04 15:38:11:154 - info: [debug] Isolating the requested simulator by deleting all others
2014-12-04 15:38:11:155 - info: [debug] Executing: xcrun simctl list devices
2014-12-04 15:38:11:203 - info: [debug] Executing: xcrun simctl delete 1FA9156F-970F-437D-AF92-9B99AC107D02
2014-12-04 15:38:11:341 - info: [debug] Not setting locale
2014-12-04 15:38:11:341 - info: [debug] No iOS / app preferences to set
2014-12-04 15:38:11:342 - info: [debug] Starting iOS 8.* simulator log capture
2014-12-04 15:38:11:379 - info: [debug] Not pre-launching simulator
2014-12-04 15:38:11:379 - info: [debug] No device id or app, not installing to real device.
2014-12-04 15:38:11:380 - info: [debug] Starting command proxy.
2014-12-04 15:38:11:382 - info: [debug] Instruments socket server started at /tmp/instruments_sock
2014-12-04 15:38:11:382 - info: [debug] Starting instruments
2014-12-04 15:38:11:387 - info: [debug] Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
2014-12-04 15:38:11:387 - info: Launching instruments
2014-12-04 15:38:11:392 - info: [debug] Attempting to run app on iPhone 6 (8.1 Simulator)
I can reproduce by changing desired_caps to use iPhone 4S iOS7.1 and then Appium will delete my iPhone6 iOS8.1 sim instead.