Appium not working for iOS after Mojave update to 10.4.4

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)

Ok, this seemed to fix it:

**xcrun simctl delete unavailable**

JAUSTEN-M1:Runtimes jausten$ xcrun simctl list devices
== Devices ==
– iOS 12.1 –
– iOS 12.1 –
iPhone 5s (C984409C-D320-4348-BDDE-A5C7A9992E5D) (Shutdown)
iPhone 6s (60E2149D-AC4A-48FF-A1E7-96CFC410E792) (Shutdown)
iPhone 6s Plus (486B222C-EC0F-4892-ABDF-6A66F24BA461) (Shutdown)
iPhone 7 (B3572994-F69D-4CEB-9D3C-26D3E090E3ED) (Shutdown)
iPhone 7 Plus (2422B180-B656-43EB-8CC5-6492D8FF3156) (Shutdown)
iPhone 8 (5E24B787-6C23-4132-9C93-977EAB4F0BDB) (Shutdown)
iPhone 8 Plus (AE87AA23-7677-4E04-AB16-5BE97B18E66A) (Shutdown)
iPhone SE (79E1EEFD-65E7-426F-A260-2CCEBEEB14E5) (Shutdown)
iPhone X (391778F2-0E7F-4D41-9802-C971BC9B35E9) (Booted)
iPhone XS (AEA0502C-2984-4622-AB99-F6B65316CFE1) (Shutdown)
iPhone XS Max (265B91EB-C8CE-4F2F-B555-F450DB5CEBBE) (Shutdown)
iPhone XR (FDE02A28-2061-48FF-8FF1-3B762B4F4E10) (Shutdown)
– tvOS 12.1 –
– watchOS 5.1 –
Apple Watch Series 2 - 38mm (37703200-3655-4F98-A0B5-A5DD27DADAC4) (Shutdown)
Apple Watch Series 2 - 42mm (731A8FFB-C163-4348-8558-AA4BFE34456D) (Shutdown)
Apple Watch Series 3 - 38mm (82E81578-EACB-403B-8E2F-CDB7E02215C6) (Shutdown)
Apple Watch Series 3 - 42mm (6BA8CDD9-3F87-4BE0-8005-9B96DEB5A437) (Shutdown)

appium@beta should already have the necessary updates

Thanks. This really messed me up for a few days but luckily I found that delete command. Will Appium be updated to correctly handle ‘unavailable device profiles’ ? Because, in my opinion, it currently has trouble with them.