Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simctl install can't find Bundle Identifier in .app when installing app in simulator

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?

like image 826
Joris van Liempd iDeveloper Avatar asked Jun 18 '15 09:06

Joris van Liempd iDeveloper


People also ask

How do I find my bundle ID for simulator?

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.

How do I add apps to Apple simulator?

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.

Which command is used to run the app on iOS simulator?

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.


1 Answers

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
like image 171
Joris van Liempd iDeveloper Avatar answered Sep 17 '22 18:09

Joris van Liempd iDeveloper