When I try to install my app in the booted simulator, like this:
xcrun simctl install booted /build/iphone/build/Debug-iphonesimulator/foo.app
I get the following result:
An error was encountered processing the command (code=22):
Failed to install the requested application
The bundle identifier of the application could not be determined.
Ensure that the application's Info.plist contains a value for CFBundleIdentifier.
When I inspect the Info.plist inside the .app, the CFBundleIdentiefier is there and correct.
<key>CFBundleIdentifier</key>
<string>com.bar.foo</string>
I am using xcode 6.3.2 on Yosemite
The simulator is booted at installation time.
What am I doing wrong?
You could use xcrun simctl get_app_container <sim_id> <app_id> command to get the full path to the given app container. In order to find all custom installed apps (system apps are kept separately) you could simply recursively scan the data/Containers root from the output above for application bundles presence.
Install Apps on SimulatorsGo to Apps > Install Application. Find and open the app you want to install from your Mac. The app appears in the list of installed apps on the right side of the iOS Gateway window.
If you wish to run your app on an iPhone SE (2nd generation), run npx react-native run-ios --simulator='iPhone SE (2nd generation)' . The device names correspond to the list of devices available in Xcode. You can check your available devices by running xcrun simctl list devices from the console.
All it was, was a wrong path:
xcrun simctl install booted /build/iphone/build/Debug-iphonesimulator/foo.app
The first forward slash shouldn't be there... as simple as that:
xcrun simctl install booted build/iphone/build/Debug-iphonesimulator/foo.app
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With