Xcode device Unavailable, runtime profile not found - ios

In the following environment:
Xcode 8.3.2
react-native-cli 2.0.1
react-native: 0.44.0
macOS Sierra 10.12.5
Just updated Xcode and macOS to run React Native and keep on practicing as I was some days ago... but everytime I try to run:
react-native run-ios
I get the error:
Scanning 555 folders for symlinks in /Users/juangarcia/projects/react-tests/CountDown/node_modules (6ms)
Found Xcode project CountDown.xcodeproj
Could not find iPhone 6 simulator
I try to see the list of devices available and I get:
~/projects/react-tests/CountDownSample » xcrun simctl list devices
== Devices ==
-- iOS 10.3 --
-- tvOS 10.2 --
Apple TV 1080p (323FA90C-0366-4B5B-AEEE-D0477C61762A) (Shutdown)
-- watchOS 3.2 --
Apple Watch - 38mm (F42C0C0D-325B-41DD-948D-E44B0A08B951) (Shutdown)
Apple Watch - 42mm (75D8BAF1-27CB-47EE-9EE3-D400B962F8BC) (Shutdown)
Apple Watch Series 2 - 38mm (64D01BD4-5C37-4885-A73A-52479D9CCF4F) (Shutdown)
Apple Watch Series 2 - 42mm (8471C9FD-BCF3-4DDC-B386-F17E128C5EB1) (Shutdown)
-- Unavailable: com.apple.CoreSimulator.SimRuntime.iOS-9-3 --
iPhone 4s (1FF2D0D3-F136-43A7-8148-7B1849A7B1E3) (Shutdown) (unavailable, runtime profile not found)
iPhone 5 (859D4D90-F1B5-4DE8-B976-6984F85CAFE3) (Shutdown) (unavailable, runtime profile not found)
iPhone 5s (5B2AD8CD-9B3F-413C-BF16-FA96F807BB2B) (Shutdown) (unavailable, runtime profile not found)
iPhone 6 (2573D214-4371-47A8-BFF6-3341862954E0) (Shutdown) (unavailable, runtime profile not found)
iPhone 6 Plus (8916CD9B-4D8B-463F-8583-75A2CE4F61FD) (Shutdown) (unavailable, runtime profile not found)
iPhone 6s (41093980-7912-4F98-9D06-981A533FAAFE) (Shutdown) (unavailable, runtime profile not found)
iPhone 6s Plus (6A85D2AE-D867-4341-979C-FEE8308DE93E) (Shutdown) (unavailable, runtime profile not found)
iPad 2 (BFBB5477-B6D9-48C3-B529-516D2D9105A7) (Shutdown) (unavailable, runtime profile not found)
iPad Retina (C49B5920-F4FF-4D7F-AA74-7AE2367FF09D) (Shutdown) (unavailable, runtime profile not found)
iPad Air (4101FC8E-D8B9-4496-AD2B-1484661C15DE) (Shutdown) (unavailable, runtime profile not found)
iPad Air 2 (9952B05C-829F-428F-AC76-EB1F8FB55D72) (Shutdown) (unavailable, runtime profile not found)
iPad Pro (735082E2-4470-4D9A-BAA1-BEDA8426B725) (Shutdown) (unavailable, runtime profile not found)
-- Unavailable: com.apple.CoreSimulator.SimRuntime.tvOS-9-2 --
Apple TV 1080p (AD48DE24-6295-4EFC-9787-A9B5D8118503) (Shutdown) (unavailable, runtime profile not found)
-- Unavailable: com.apple.CoreSimulator.SimRuntime.watchOS-2-2 --
Apple Watch - 38mm (C3F2A7C3-3967-4159-9B79-13CBA63E399E) (Shutdown) (unavailable, runtime profile not found)
Apple Watch - 42mm (656005A9-7555-4872-A7FB-FB6BCB65139C) (Shutdown) (unavailable, runtime profile not found)
react takes by default Iphone 6 to work with, and it is not available
how can I make it available again? and why did this happen?

I had this issue in xCode 9 and 10.2.
For others that ends up here with the same problem, here is what helped me:
Close xCode
Restart your laptop (I know it is huge bummer)
Open xCode and run the build again

TL;DR:
Upgrade unavailable simulators to the latest (or the desired) iOS runtime using xcrun simctl upgrade
Details:
I was in this situation probably after performing a xcrun simctl delete unavailable with both Xcode 10 and Xcode 11 installed (and Xcode 10 as currently active).
Executing xcrun simctl list runtimes I found the iOS 13.1 runtime listed:
iOS 11.4 (11.4 - 15F79) - com.apple.CoreSimulator.SimRuntime.iOS-11-4
iOS 13.1 (13.1 - 17A844) - com.apple.CoreSimulator.SimRuntime.iOS-13-1
tvOS 13.0 (13.0 - 17J585) - com.apple.CoreSimulator.SimRuntime.tvOS-13-0
watchOS 6.0 (6.0 - 17R575) - com.apple.CoreSimulator.SimRuntime.watchOS-6-0
But when I executed xcrun simctl list, several simulators are listed as unavailable:
iPhone 8 Plus (B08025C1-B7A2-40C0-B6D5-517EC8BB3C45) (Shutdown) (unavailable, runtime profile not found)
iPhone Xs (0A1C1EAA-8E18-4508-9E14-C376D944984B) (Shutdown) (unavailable, runtime profile not found)
iPhone Xs Max (84C692F5-6CF3-449D-B166-0EA26B1FAC4B) (Shutdown) (unavailable, runtime profile not found)
iPhone Xʀ (7581E116-5CFB-4A94-94A0-30B5B8871874) (Shutdown) (unavailable, runtime profile not found)
My solution was to upgrade the unavailable simulators to the desired iOS runtime (iOS 13.1 in my case):
xcrun simctl upgrade SIMULATOR_ID "com.apple.CoreSimulator.SimRuntime.iOS-13-1"
To avoid having to perform this manually for all simulators I wrote this small ruby script to upgrade all the iPhones at once:
#!/usr/bin/ruby
uuid_regex = /([0-9A-Z]{8}-[0-9A-Z]{4}-[0-9A-Z]{4}-[0-9A-Z]{4}-[0-9A-Z]{12})/
unavailable_iPhones = `xcrun simctl list | grep iPhone | grep "runtime profile not found"`.split("\n")
unavailable_iPhones.each do | row |
uuid = row.match(uuid_regex).captures.first
system("xcrun simctl upgrade #{uuid} \"com.apple.CoreSimulator.SimRuntime.iOS-13-1\"")
end

pfff it was simpler than expected... when installing SO and Xcode, by some reason, the whole list of devices where removed... going to Xcode UI menu adding a new simulator in this case iPhone 6 was enough... I tried restarting and going back, and so on did not know there was an option in UI for this as I am new to XCode environment. thx for the answers.
In the XCode menu, Window --> Devices --> Add the new simulator...

I went to
node_modules/react-native/local-cli/runIOS/findMatchingSimulator.js
And i've replaced:
if (version.indexOf('iOS') !== 0 )
with
if (!version.includes("iOS" ))
And
if (simulator.availability !== '(available)')
with
if (simulator.isAvailable !== true)

Missing ios14 simulator option in Xcode 12 beta 4 workaround:
Check out this fantastic article about simctl.
I created an iOS14 sim since the XC12-beta4 was not giving me a download / create option via:
xcrun simctl create <name> <device> <os>
ex.
xcrun simctl create iPhone-8Plus-14 com.apple.CoreSimulator.SimDeviceType.iPhone-8-Plus com.apple.CoreSimulator.SimRuntime.iOS-14-0

If you have or have had multiple versions of Xcode open, you may need to reboot or completely re-install the CoreSimulatorService, an evil, globally installed background service that somehow remains online and available to many versions of Xcode despite it being compatible with only one version.
See more here: https://stackoverflow.com/a/72946533/731285
Other symptoms of this issue: Simulators not showing up in the Window > Devices and Simulators listing and the following:
Command CompileAssetCatalog failed with a nonzero exit code
Encountered an error communicating with IBAgent-iOS. Failed to boot device iPhone Xs

Related

Xcode 13.1 with MacOS 12.0.1 cannot create iPhone 5s simulator

I get to here by clicking on the simulator drop-down at the top, clicking Add Additional Simulators, going to the simulators tab, and clicking the plus in the bottom left corner.
But if I click create, this happens.
If I try to download an old runtime like iOS 11.4, it does not show up in the OS Version list like it used to. Does anybody know if something has changed since Xcode 12.5.1 and MacOS 11? Thanks for any advice.
If you run the command xcrun simctl list runtimes in Teerminal you will see an output similar to this:
== Runtimes ==
iOS 11.4 (11.4 - 15F79) - com.apple.CoreSimulator.SimRuntime.iOS-11-4 (unavailable, The iOS 11.4 simulator runtime is not supported on hosts after macOS 11.99.0.)
iOS 12.0 (12.0 - 16A366) - com.apple.CoreSimulator.SimRuntime.iOS-12-0 (unavailable, The iOS 12.0 simulator runtime is not supported on hosts after macOS 11.99.0.)
iOS 15.2 (15.2 - 19C51) - com.apple.CoreSimulator.SimRuntime.iOS-15-2
tvOS 15.2 (15.2 - 19K50) - com.apple.CoreSimulator.SimRuntime.tvOS-15-2
watchOS 8.3 (8.3 - 19S51) - com.apple.CoreSimulator.SimRuntime.watchOS-8-3
Your output may be different depending on the simulators you have installed on your system.
As it appears, some versions of iOS are not compatible with macOS 12+.
Even if you try to do it from Terminal, as such:
xcrun simctl create 'iPhone 5s (12.0)' com.apple.CoreSimulator.SimDeviceType.iPhone-5s com.apple.CoreSimulator.SimRuntime.iOS-12-0
You will get an error like:
Unable to create a device for device type: iPhone 5s (com.apple.CoreSimulator.SimDeviceType.iPhone-5s), runtime: iOS 12.0 (12.0 - 16A366) - com.apple.CoreSimulator.SimRuntime.iOS-12-0 (unavailable, The iOS 12.0 simulator runtime is not supported on hosts after macOS 11.99.0.)
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=401):
The iOS 12.0 simulator runtime is not available.
The iOS 12.0 simulator runtime is not supported on hosts after macOS 11.99.0.
The iOS 12.0 simulator runtime is not supported on macOS 12.0.1
I have yet to find a list of which iOS simulators are compatible, nor a workaround.

Xcode 11.5 doesn't support iOS 13.6?

Attempting to connect via USB or wireless doesn't work. Xcode reports:
The current device configuration is unsupported. This iPad mini (5th generation) is running iOS 13.6 (17G68), which is not supported by Xcode 11.5.
Anyone know of a work-around/update?

Unable to install Enterprise app on iPhone 11 pro max

We are able to install Enterprise app on iPhone 8, iPhone 7, iPhone XR with iOS 13.3 OS version. But the same app unable to install on iPhone 11 pro max. Getting 'Unable to install app' error message.
Any idea why this has happened? Any apple privacy changes have been updated for iPhone 11 pro max?

Flutter : How to specify a device id in flutter?

How to select a device id in flutter run?
please specify a device with the '-d ' flag, or use '-d all'
to act on all devices
iPhone 6 • 54XXXXXX35130ebefd38f • ios • iOS 10.3.3
iPhone 7 Plus • BA8CXXXXXXD0-577D675d • ios • iOS 11.2 (simulator)
Simply use
flutter run -d iPhone 6
For me this also works fine
flutter run -d BA8CXXXXXXD0-577D675d
flutter run -d "Iphone 6"
Test on MacOS High Sierra (
use the command on the terminal of android studio -
#flutter run -d "device name or id"
if the device name contains blank space it throws an error, so using device ID is better...
for example in my case the device ID was-
#flutter run -d 590******140
and it worked :)
If you need to open on simulator, try this:
Get all devices available xcrun simctl list
Output can be like this
== Devices ==
-- iOS 13.5 --
iPhone 8 (21DB8D2B-F71B-4D91-AB56-FD64A20CEEE7) (Shutdown)
iPhone 8 Plus (D4AA1ABE-D40B-437D-9373-9AF89F2A4951) (Shutdown)
iPhone 11 (44CE162D-D077-4165-BE44-33DE723FDBAB) (Shutdown)
Set the desired device xcrun simctl boot 21DB**** ( For iPhone 8)
Run flutter flutter run
If no open any simulator, run open -a Simulator

Xcode cannot run iOS simulator

Version 8.0 beta 5.
I've recently installed the above beta version of Xcode but I'm unable to run any iOS 10.0 simulators. I've done various uninstalls on both the 8 beta and Xcode 7, clearing out directories and reboots but no success. After reinstalling I still can't run iOS 10.0 simulators. (I've copied the Xcode download to another machine and successfully unpacked and installed it there without any problems, so it's not a corrupt download.)
xcrun yields the following information...
09:44:13 ~ > xcrun simctl list
== Device Types ==
iPhone 4s (com.apple.CoreSimulator.SimDeviceType.iPhone-4s)
iPhone 5 (com.apple.CoreSimulator.SimDeviceType.iPhone-5)
iPhone 5s (com.apple.CoreSimulator.SimDeviceType.iPhone-5s)
:
iPad Pro (9.7-inch) (com.apple.CoreSimulator.SimDeviceType.iPad-Pro--9-7-inch-)
iPad Pro (12.9-inch) (com.apple.CoreSimulator.SimDeviceType.iPad-Pro)
Apple TV 1080p (com.apple.CoreSimulator.SimDeviceType.Apple-TV-1080p)
== Runtimes ==
iOS 8.1 (8.1 - 12B411) (com.apple.CoreSimulator.SimRuntime.iOS-8-1)
iOS 9.3 (9.3 - 13E233) (com.apple.CoreSimulator.SimRuntime.iOS-9-3)
iOS 10.0 (10.0 - 14A5335a) (com.apple.CoreSimulator.SimRuntime.iOS-10-0) (unavailable, failed to open liblaunch_sim.dylib)
tvOS 10.0 (10.0 - 14T5321a) (com.apple.CoreSimulator.SimRuntime.tvOS-10-0)
== Devices ==
-- iOS 8.1 --
-- iOS 9.3 --
-- iOS 10.0 --
-- tvOS 10.0 --
== Device Pairs ==
09:44:18 ~ >
Any help appreciated.
sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService
This brought my simulators back to the run menu, allowed me to add more, and my simulators actually now run again. (Xcode 10b6).
Strangely enough, seemed to clear up a system header build problem too.. now my extra system header search directory location works and no compile error indicating it can't find the files and I did not mod the project.
Finally got it working. I (for the third or fourth time) deleted Xcode-beta.app and Xcode.app and also all the associated files and directories I could find (using the free app AppDelete Lite.app. In addition, I also deleted the /Application/Contents/ directory.
Then, I extracted the Xcode-beta.app again and installed it as normal and it all worked. I'd be happier if I could pin down the cause of the problem and happier still if I could get the lost two days of my life back but at least everything appears to be working now.
This should solve your problem:
killall "Simulator" 2> /dev/null; xcrun simctl erase all

Resources