React Native version: 0.60.4

The Xcode is updated version 11 and the "iPhone X" simulator is disabled and cannot be run with an existing "react-native run-ios".
F*ck apple:
Workaround solution awaiting fix (is was no able to find where is the default in the cli source code…) :
yarn react-native run-ios --simulator "iPhone 11 Pro Max"npx react-native run-ios --simulator "iPhone 11 Pro Max"react-native run-ios --simulator "iPhone 11 Pro Max"./node_modules/.bin/react-native run-ios --simulator "iPhone 11 Pro Max"The message I got from @bartolkaruza having this issue:
The problem was that I had the iPhone X sim open _during_ the xcode upgrade. This leaves it in a weird unupgraded state and it becomes unreachable to Xcode or the sim cli.
Have you tried restarting Xcode _and_ Simulator as well?
I just upgraded to Catalina and XCode 11 today and I have only iPhone 11 simulators. I didn't have iPhone X simulator open during the upgrade.

Edit: this was not really an upgrade in traditional sense, I deleted the old XCode and then installed the new version from App Store.
@satya164 this seems like a bug in Simulator, likely because Catalina is still in beta
@thymikee XCode 11 is stable though
Hah, this is the list I have, and surprisingly no iPhone X there :D

I guess we'll need to change the logic to:
What do you think, makes sense?
Another workaround is to add back the removed iPhone X in Simulator's Hardware > Device > Manage Devices menu
I met the same problem and @wbadam 's workaround works fine to me. 👍
Thank you!
I change my package.json to solve this temporarily:
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios --simulator=\"iPhone 11 Pro\"",
"start": "react-native start",
"test": "jest",
"lint": "eslint .",
"postinstall": "jetify"
},
Workaround solution awaiting fix (is was no able to find where is the default in the cli source code…) :
yarn react-native run-ios --simulator "iPhone 11 Pro Max"npx react-native run-ios --simulator "iPhone 11 Pro Max"react-native run-ios --simulator "iPhone 11 Pro Max"./node_modules/.bin/react-native run-ios --simulator "iPhone 11 Pro Max"
Great, it solved the problem
good job
thanks
F*ck apple:
Workaround solution awaiting fix (is was no able to find where is the default in the cli source code…) :
yarn react-native run-ios --simulator "iPhone 11 Pro Max"npx react-native run-ios --simulator "iPhone 11 Pro Max"react-native run-ios --simulator "iPhone 11 Pro Max"./node_modules/.bin/react-native run-ios --simulator "iPhone 11 Pro Max"
Where is the default set for "iPhone X" in the source code? anyone knows?
I have downloaded ios 10 and it automatically added iPhone x and other devices
iPhone 8 seems to be present in all the simulator runtimes from iOS 11.4 to 13.1, so it seems like the best possible default for now:
$ xcrun simctl list devices
== Devices ==
-- iOS 13.1 --
iPhone 8 (E6C0A708-B0D4-4008-A090-A26F112A01E8) (Shutdown)
iPhone 8 Plus (877C82E0-03DF-4C82-8756-5B5A44D02319) (Shutdown)
iPhone 11 (58D79C3C-3288-42FA-A503-05DCEC4FCA48) (Booted)
iPhone 11 Pro (5B60E7C2-B58A-4B30-A144-8BC5B70C4427) (Shutdown)
iPhone 11 Pro Max (AB596410-896A-4A0A-9E9D-0665EC5523D0) (Shutdown)
(...)
-- Unavailable: com.apple.CoreSimulator.SimRuntime.iOS-11-4 --
iPhone 5s (03C14674-3BCE-46A4-BD90-68B7A3A5BF13) (Shutdown) (unavailable, runtime profile not found)
iPhone 6 Plus (9BD43F98-E807-4BBA-9419-1BF4D3C4D26E) (Shutdown) (unavailable, runtime profile not found)
iPhone 6 (F13E17A8-E93C-44FC-94ED-4B64051CA8A1) (Shutdown) (unavailable, runtime profile not found)
iPhone 6s (AD16BCA5-C23A-4351-8B80-2BB8186173C9) (Shutdown) (unavailable, runtime profile not found)
iPhone 6s Plus (5A196500-3D65-44DA-897B-6921DAAF191A) (Shutdown) (unavailable, runtime profile not found)
iPhone SE (0A77DC6D-431F-4D96-A2F8-E6CD7AB517DE) (Shutdown) (unavailable, runtime profile not found)
iPhone 7 (BB664C97-92B3-4702-90B9-D2B2A56460B4) (Shutdown) (unavailable, runtime profile not found)
iPhone 7 Plus (5723F93A-96CD-4E76-82DD-68D3A6F08750) (Shutdown) (unavailable, runtime profile not found)
iPhone 8 (6B334928-A9D9-420C-8E5D-4218502C856F) (Shutdown) (unavailable, runtime profile not found)
iPhone 8 Plus (D4098A3B-2D30-420C-8933-D45193E91AEF) (Shutdown) (unavailable, runtime profile not found)
iPhone X (25EB55C8-0954-454E-BFBB-CAEE67C09392) (Shutdown) (unavailable, runtime profile not found)
(...)
-- Unavailable: com.apple.CoreSimulator.SimRuntime.iOS-12-0 --
iPhone 5s (AEE1F51F-7934-48DB-8DDB-FD7B4E8B2BFD) (Shutdown) (unavailable, runtime profile not found)
iPhone 6 Plus (4D61816F-ABAB-49C9-B60D-8772C9FC1171) (Shutdown) (unavailable, runtime profile not found)
iPhone 6 (6347529A-6CD8-4430-9EE3-DD697E029D5A) (Shutdown) (unavailable, runtime profile not found)
iPhone 6s (62E28209-2E02-47FD-A4F7-F975EAAEB9BF) (Shutdown) (unavailable, runtime profile not found)
iPhone 6s Plus (90103565-71B4-47C3-B583-FCD404432F44) (Shutdown) (unavailable, runtime profile not found)
iPhone SE (D9CD5DC5-E297-4C0B-A264-8955BCDB0FD1) (Shutdown) (unavailable, runtime profile not found)
iPhone 7 (E0A5A563-931A-40D7-AE62-1069C6EDEB8B) (Shutdown) (unavailable, runtime profile not found)
iPhone 7 Plus (A928C4B3-133C-472D-8E4C-620A12A28827) (Shutdown) (unavailable, runtime profile not found)
iPhone 8 (F3B3A1DC-4BE1-4257-ACD6-F5633C2F5BB9) (Shutdown) (unavailable, runtime profile not found)
iPhone 8 Plus (06CF9A7F-85E6-4BC9-9646-F92AEA5D3828) (Shutdown) (unavailable, runtime profile not found)
iPhone X (29A830D7-E88B-4E91-9EE4-52E0C7B86DAD) (Shutdown) (unavailable, runtime profile not found)
iPhone XS (38BF0981-F553-4626-98A2-7B7836F1F2DF) (Shutdown) (unavailable, runtime profile not found)
iPhone XS Max (893A39FF-C30F-4FC4-8851-3B9C1DE70E92) (Shutdown) (unavailable, runtime profile not found)
iPhone XR (04F4A596-793B-4CF0-A6C1-BDF0BB0C57A3) (Shutdown) (unavailable, runtime profile not found)
(...)
-- Unavailable: com.apple.CoreSimulator.SimRuntime.iOS-12-1 --
iPhone 5s (EDBBDF5C-B738-4FC3-B024-6F8249352061) (Shutdown) (unavailable, runtime profile not found)
iPhone 6 Plus (3571A94F-834B-4CB7-8350-66704572F6AE) (Shutdown) (unavailable, runtime profile not found)
iPhone 6 (E0CCBA8A-0A02-4577-AA8A-B0C83EF35B1F) (Shutdown) (unavailable, runtime profile not found)
iPhone 6s (1820618E-5D80-4D57-A867-17BB21F6B85B) (Shutdown) (unavailable, runtime profile not found)
iPhone 6s Plus (D1FFD24C-C6B7-4F81-BADB-0B2A179B40B4) (Shutdown) (unavailable, runtime profile not found)
iPhone SE (B73E45ED-4881-45D6-9A59-1D4841DD5C60) (Shutdown) (unavailable, runtime profile not found)
iPhone 7 (8971DA3C-56B5-4DAD-960E-BA8E6B7710B4) (Shutdown) (unavailable, runtime profile not found)
iPhone 7 Plus (83DCE981-50EE-4034-9DC6-8673D905798A) (Shutdown) (unavailable, runtime profile not found)
iPhone 8 (6D29D15D-BA30-42FD-9D52-69E3F09A6D21) (Shutdown) (unavailable, runtime profile not found)
iPhone 8 Plus (F17C6286-F873-40FB-A529-967BEF4F507C) (Shutdown) (unavailable, runtime profile not found)
iPhone X (D36EA1B1-C0BC-4950-8654-F78819CF5C8B) (Shutdown) (unavailable, runtime profile not found)
iPhone Xs (E366CD0C-C69D-49BD-BB5B-A2953ED27CEE) (Shutdown) (unavailable, runtime profile not found)
iPhone Xs Max (9DD1EFA2-8F4F-4D81-955B-4C94C2F5B75A) (Shutdown) (unavailable, runtime profile not found)
iPhone Xʀ (D41A6A26-9424-415F-B9F8-89FD1FF7960C) (Shutdown) (unavailable, runtime profile not found)
(...)
-- Unavailable: com.apple.CoreSimulator.SimRuntime.iOS-12-2 --
iPhone 5s (BA096B20-81A7-47B7-A7D4-DD9296FAFCDA) (Shutdown) (unavailable, runtime profile not found)
iPhone 6 Plus (2CD0432C-DC45-4214-BF06-E74E3BE4C89F) (Shutdown) (unavailable, runtime profile not found)
iPhone 6 (6C56F5EB-F08B-49E5-A142-3F41B657376E) (Shutdown) (unavailable, runtime profile not found)
iPhone 6s (1F6F1382-02A5-4199-B183-6316C0B17242) (Shutdown) (unavailable, runtime profile not found)
iPhone 6s Plus (BB1E3245-8EFD-428A-946D-1E141F285A01) (Shutdown) (unavailable, runtime profile not found)
iPhone SE (41C5B638-6AF0-48C7-A53A-9A8016BE627C) (Shutdown) (unavailable, runtime profile not found)
iPhone 7 (296357EE-78BB-418B-92B1-A83F7C4A4F70) (Shutdown) (unavailable, runtime profile not found)
iPhone 7 Plus (8A5EAB81-03E1-4182-BEE6-89081C59F8CB) (Shutdown) (unavailable, runtime profile not found)
iPhone 8 (7CED96E6-AFD7-4A7A-9C37-9BD5CF01A2E3) (Shutdown) (unavailable, runtime profile not found)
iPhone 8 Plus (0620BCBC-3B91-4828-8617-914D40BE0327) (Shutdown) (unavailable, runtime profile not found)
iPhone X (4B6E4243-6DF7-4E67-82A9-5AF8D059B1DB) (Shutdown) (unavailable, runtime profile not found)
iPhone Xs (10BFFC31-91A1-456B-9EA3-DF9AD3121D6C) (Shutdown) (unavailable, runtime profile not found)
iPhone Xs Max (A65D2017-717A-40E4-AFDF-BED638C8F872) (Shutdown) (unavailable, runtime profile not found)
iPhone Xʀ (FC1AEA4A-F7BA-4059-B780-264BEF36C5FD) (Shutdown) (unavailable, runtime profile not found)
(...)
-- Unavailable: com.apple.CoreSimulator.SimRuntime.iOS-12-4 --
iPhone 5s (6CC0BD71-1AA9-4E50-9CBB-F1989DDAD594) (Shutdown) (unavailable, runtime profile not found)
iPhone 6 Plus (1A1E2E0B-28EA-4911-967E-2AB728174A0B) (Shutdown) (unavailable, runtime profile not found)
iPhone 6 (2CC07792-FA80-4140-AA65-47804F8F120D) (Shutdown) (unavailable, runtime profile not found)
iPhone 6s (25528BF3-E595-4CF1-8BED-46423FECA68A) (Shutdown) (unavailable, runtime profile not found)
iPhone 6s Plus (F9CE50FA-DDD3-49A3-B0E8-A5B1BA247D58) (Shutdown) (unavailable, runtime profile not found)
iPhone SE (6A9EFC3D-82FB-4739-95A1-B1651559C2FE) (Shutdown) (unavailable, runtime profile not found)
iPhone 7 (ECE6825E-DAEF-43AE-9EBB-DF5D029DFB8A) (Shutdown) (unavailable, runtime profile not found)
iPhone 7 Plus (D52C9B62-0EB2-4CCB-AB68-335D8AC9BCF9) (Shutdown) (unavailable, runtime profile not found)
iPhone 8 (9293921F-8683-44F4-B591-15F2455A66E2) (Shutdown) (unavailable, runtime profile not found)
iPhone 8 Plus (E94AC310-8349-48ED-9A4F-2690A0C75D88) (Shutdown) (unavailable, runtime profile not found)
iPhone X (1BEEDD49-5071-4F72-B61F-D3857AE91644) (Shutdown) (unavailable, runtime profile not found)
iPhone Xs (825B5F57-4022-4909-BABD-F00C597D3E00) (Shutdown) (unavailable, runtime profile not found)
iPhone Xs Max (103A4844-CC9D-49FE-B824-80EB1C6B8F5B) (Shutdown) (unavailable, runtime profile not found)
iPhone Xʀ (185D8059-D1E7-4E9E-85D2-62E1DD2440AC) (Shutdown) (unavailable, runtime profile not found)
(...)
-- Unavailable: com.apple.CoreSimulator.SimRuntime.iOS-13-0 --
iPhone 8 (BB276684-A27E-40A2-BFEE-44EE4A0C764A) (Shutdown) (unavailable, runtime profile not found)
iPhone 8 Plus (123B6D31-1055-4390-BFC4-07BDE02FDBB4) (Shutdown) (unavailable, runtime profile not found)
iPhone Xs (23B61C02-E98B-4AA0-B5B0-2B769ACAAF3A) (Shutdown) (unavailable, runtime profile not found)
iPhone Xs Max (F53B4FA8-8179-49BA-B0CC-C81D93C199F3) (Shutdown) (unavailable, runtime profile not found)
iPhone Xʀ (5304ADD7-BD6F-4358-9B36-128F56DA997A) (Shutdown) (unavailable, runtime profile not found)
iPhone 11 (18B3AD0C-ABF9-474B-8E35-ED20B1BDE6AB) (Shutdown) (unavailable, runtime profile not found)
iPhone 11 Pro (23BE9A8A-B0F0-48B2-9C58-01CA06B95AA0) (Creating) (unavailable, runtime profile not found)
iPhone 11 Pro Max (2019A7CB-F21F-484F-B468-676B3E4EFA89) (Creating) (unavailable, runtime profile not found)
(...)
This have been fixed by https://github.com/react-native-community/cli/pull/758
@codler thanks for linking this. It's fixed for RN 0.61. We'll soon release patch versions for older versions, please be patient.
@thymikee is there a solution for older versions?
never mind, I found the solution.
inside: .../node_modules/@react-native-community/cli/build/commands/runIOS
under: var _default = {
name: 'run-ios',
...
I changed this:
options: [{
command: '--simulator [string]',
description: 'Explicitly set simulator to use. Optionally include iOS version between' + 'parenthesis at the end to match an exact version: "iPhone 6 (10.0)"',
default: 'iPhone X'
}
to:
options: [{
command: '--simulator [string]',
description: 'Explicitly set simulator to use. Optionally include iOS version between' + 'parenthesis at the end to match an exact version: "iPhone 6 (10.0)"',
default: 'iPhone 11 Pro'
}
For me, the solution is:
find node_modules/react-native/local-cli/runIOS/findMatchingSimulator.js,
First, Change
if (!version.startsWith('iOS') && !version.startsWith('tvOS')) {
continue;
}
into
if (!version.startsWith('com.apple.CoreSimulator.SimRuntime.iOS') && !version.startsWith('com.apple.CoreSimulator.SimRuntime.tvOS')) {
continue;
}
Then change
if (
simulator.availability !== '(available)' &&
simulator.isAvailable !== 'YES'
) {
continue;
}
into
if (simulator.availability !== '(available)' && simulator.isAvailable !== true) {
continue;
}
It works for me. Good luck!
@lchenfox you can also update the @react-native-community/cli to the latest version and have this included.
Okay. Thanks a lot. I'll have a try @thymikee
Most helpful comment
F*ck apple:
Workaround solution awaiting fix (is was no able to find where is the default in the cli source code…) :
yarn react-native run-ios --simulator "iPhone 11 Pro Max"npx react-native run-ios --simulator "iPhone 11 Pro Max"react-native run-ios --simulator "iPhone 11 Pro Max"./node_modules/.bin/react-native run-ios --simulator "iPhone 11 Pro Max"