On Monday, March 25th, I accepted an OSX Mojave update from 10.14.3 . to 10.14.4 . This, in turn, triggered an auto update from XCode 10.1 to 10.2 . It updated my mobile devices from 12.1 to 12.2 of iOS . Since then, my iOS emulators do not work with iOS any longer. I tried using the previous 12.1 emulators and I get the exact same problem. It tried downgrading Xcode back to 10.1, and I get the same issue still. I suspect Appium needs adjustment to support new configurations Apple put into place??? Appium now throws an error and says:
[XCUITest] Error: '12.1' does not exist in the list of simctl SDKs. No Simulator SDK versions are available on your system. Please install some via Xcode preferences.
[XCUITest] at /Applications/Appium.app/Contents/Resources/app/node_modules/node-simctl/lib/simctl.js:551:13
[XCUITest] at Generator.next ()
[XCUITest] at asyncGeneratorStep (/Applications/Appium.app/Contents/Resources/app/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
[XCUITest] at _next (/Applications/Appium.app/Contents/Resources/app/node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)
[XCUITest] at run (/Applications/Appium.app/Contents/Resources/app/node_modules/core-js/modules/es6.promise.js:75:22)
[XCUITest] at /Applications/Appium.app/Contents/Resources/app/node_modules/core-js/modules/es6.promise.js:92:30
[XCUITest] at flush (/Applications/Appium.app/Contents/Resources/app/node_modules/core-js/modules/_microtask.js:18:9)
[XCUITest] at process._tickCallback (internal/process/next_tick.js:61:11)
[XCUITest] Not clearing log files. Use `clearSystemFiles` capability to turn on.
Also I had a similar problem deploying from a React-Native project folder into a iOS devices, but I was able to fix that by hacking one of the react-native .js files so it now works. This is why I think Appium could be similarly adjusted? :
What fixed it for react-native project:
A quick fix for this issue is to update the if statement inside
./node_modules/react-native/local-cli/runIOS/findMatchingSimulator.js
to be
if (!version.includes('iOS') && !version.includes('tvOS')) {
My configuration:
14:36 $ react-native info
React Native Environment Info:
System:
OS: macOS 10.14.4
CPU: x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
Memory: 693.75 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.13.0 - ~/.nvm/versions/node/v10.13.0/bin/node
Yarn: 1.15.2 - /usr/local/bin/yarn
npm: 6.9.0 - ~/.nvm/versions/node/v10.13.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
Android SDK:
Build Tools: 27.0.3, 28.0.3
API Levels: 26, 27, 28
IDEs:
Android Studio: 3.3 AI-182.5107.16.33.5264788
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
react: 16.6.3 => 16.6.3
react-native: 0.57.8 => 0.57.8
npmGlobalPackages:
react-native-cli: 2.0.1
And
14:54 $ instruments -s devices | grep 'iPhone X'
iPhone X (12.1) [391778F2-0E7F-4D41-9802-C971BC9B35E9] (Simulator)
iPhone XR (12.1) [FDE02A28-2061-48FF-8FF1-3B762B4F4E10] (Simulator)
iPhone XS (12.1) [AEA0502C-2984-4622-AB99-F6B65316CFE1] (Simulator)
iPhone XS Max (12.1) [265B91EB-C8CE-4F2F-B555-F450DB5CEBBE] (Simulator)