Skip to content

react-native run-ios --simulator='<any name>' doesn't find simulator and instead uses default #34866

Description

@KodyFintak

Description

When upgrading to RN 70 our team noticed that the react-native run-ios --simulator='<any name> doesn't find simulator and instead uses the default simulator on your machine.

This seems to occur only with a combination of using RN 70 and also using the latest Xcode version (14.0.1)

Output

react-native run-ios --simulator='iPad mini (6th generation)'
info Found Xcode workspace "myproject.xcworkspace"
info Building (using "xcodebuild -workspace myproject.xcworkspace -configuration Debug -scheme myproject -destination id=ABB4816C-35D2-40C8-B328-DA2B0D447F34")
(node:13921) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 70. To debug build logs further, consider building your app with Xcode.app, by opening myproject.xcworkspace.
Command line invocation:
    /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace myproject.xcworkspace -configuration Debug -scheme myproject -destination id=ABB4816C-35D2-40C8-B328-DA2B0D447F34

User defaults from command line:
    IDEPackageSupportUseBuiltinSCM = YES


2022-10-04 14:54:56.582 xcodebuild[13931:1047299] Writing error result bundle to /var/folders/78/z97spd6n5dd3fvh7vcs1dlnh0000gn/T/ResultBundle_2022-04-10_14-54-0056.xcresult
xcodebuild: error: Unable to find a destination matching the provided destination specifier:
		{ id:ABB4816C-35D2-40C8-B328-DA2B0D447F34 }

	Available destinations for the "my project" scheme:
		{ platform:macOS, arch:arm64, variant:Designed for [iPad,iPhone], id:00006001-0002302221F8801E }
		{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }
		{ platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }
		{ platform:iOS, id:00008027-0009259E0E87002E, name:Kody’s iPad Pro }
		{ platform:iOS, id:00008020-001E29823C45402E, name:UATH99FQ9Q5Q1GC }
		{ platform:iOS Simulator, id:41821153-E280-4F7D-B966-9D58E08C8032, OS:14.5, name:iPad (8th generation) }
		{ platform:iOS Simulator, id:8F99B1CA-F382-4BDB-88C8-CD080141F7EF, OS:15.5, name:iPad (9th generation) }
		{ platform:iOS Simulator, id:67D46FB5-F239-4C8B-9656-3DCB09490CEA, OS:16.0, name:iPad (9th generation) }
		{ platform:iOS Simulator, id:42725327-CF63-44A1-9055-6CAC13EEF401, OS:14.5, name:iPad Air (4th generation) }
		{ platform:iOS Simulator, id:BCC3C2B7-A428-4505-B3C3-F71B48395CCC, OS:15.5, name:iPad Air (5th generation) }
		{ platform:iOS Simulator, id:E967D281-CAB5-4D47-A909-6697780F0A66, OS:16.0, name:iPad Air (5th generation) }
		{ platform:iOS Simulator, id:DE802668-FA74-4E91-9847-ABCF26C299F9, OS:14.5, name:iPad Pro (9.7-inch) }
		{ platform:iOS Simulator, id:F3234D63-48E0-4608-BD1C-DA60A50DC48B, OS:15.5, name:iPad Pro (9.7-inch) }
		{ platform:iOS Simulator, id:1D925EB0-8984-4CB3-B54C-F6EBE1B895BB, OS:14.5, name:iPad Pro (11-inch) (3rd generation) }
		{ platform:iOS Simulator, id:3B6128BD-871C-4C11-A8DC-3AF02F4E3DE5, OS:15.5, name:iPad Pro (11-inch) (3rd generation) }
		{ platform:iOS Simulator, id:6CCE362B-5C1B-48C2-BF6C-EECB4AF323CC, OS:16.0, name:iPad Pro (11-inch) (3rd generation) }
		{ platform:iOS Simulator, id:533CF798-98FC-4ACB-9004-8BBACF83622A, OS:14.5, name:iPad Pro (12.9-inch) (5th generation) }
		{ platform:iOS Simulator, id:C6557531-48CC-4EE2-9760-9792E4D77EA0, OS:15.5, name:iPad Pro (12.9-inch) (5th generation) }
		{ platform:iOS Simulator, id:DC5D1F34-2499-4B12-8B98-7FD86AB027C1, OS:16.0, name:iPad Pro (12.9-inch) (5th generation) }
		{ platform:iOS Simulator, id:28D36DCF-0F95-4120-A3E0-79C117E9F559, OS:15.5, name:iPad mini (6th generation) }
		{ platform:iOS Simulator, id:26907D10-B1D8-407F-BF5F-C7DA4ED47126, OS:16.0, name:iPad mini (6th generation) }

Version

0.70.1

Output of npx react-native info

warn Package react-native-vector-icons contains invalid configuration: "dependency.assets" is not allowed. Please verify it's properly linked using "react-native config" command and contact the package maintainers about this.
info Fetching system and libraries information...
System:
    OS: macOS 12.6
    CPU: (10) arm64 Apple M1 Max
    Memory: 548.34 MB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.15.0 - ~/.nvm/versions/node/v16.15.0/bin/node
    Yarn: 1.22.18 - ~/.nvm/versions/node/v16.15.0/bin/yarn
    npm: 8.19.2 - ~/.nvm/versions/node/v16.15.0/bin/npm
    Watchman: Not Found
  Managers:
    CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.4, iOS 16.0, macOS 12.3, tvOS 16.0, watchOS 9.0
    Android SDK: Not Found
  IDEs:
    Android Studio: Chipmunk 2021.2.1 Patch 2 Chipmunk 2021.2.1 Patch 2
    Xcode: 14.0.1/14A400 - /usr/bin/xcodebuild
  Languages:
    Java: 17.0.2 - /Users/kodyfintak/.sdkman/candidates/java/current/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.1.0 => 18.1.0
    react-native: 0.70.1 => 0.70.1
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps to reproduce

Use RN 0.70.1 and Xcode 14.0.1 and run the command react-native run-ios --simulator='iPad mini (6th generation)' on a new react-native project.

Snack, code example, screenshot, or link to a repository

bootstrap a RN project and it will have the issue

Activity

  1. cortinico commented on Oct 6, 2022

    @cortinico
    Contributor

    Hi @KodyFintak
    Thanks for reporting this issue.

    It seems like this is a duplicate of this: react-native-community/cli#1707 which is already fixed.

    As a rule of thumb, issues against the CLI should be opened here:
    https://github.com/react-native-community/cli/issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions