I have a desktop app which I’m trying to port to mobile, currently focussing on iOS.
I’ve followed the instructions for Building for iOS using CMake:
cmake -Bbuild-ios -DCMAKE_BUILD_TYPE=Debug -GXcode -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_DEPLOYMENT_TARGET=15.0
cmake --build build-ios -- -sdk iphonesimulator -allowProvisioningUpdates
The build succeeds but then I’m unable to install the app bundle on the simulator device.
I boot a simulated device with:
xcrun simctl boot <device-id>
with a device ID obtained from xcrun simctl list, and I can see the device has booted by running xcrun simctl list again.
But then when I try to install the app with:
xcrun simctl install booted build-ios/MyApp_artefacts/Debug/Standalone/MyApp.app
I get the following output:
An error was encountered processing the command (domain=IXErrorDomain, code=13):
Simulator device failed to install the application.
Missing bundle ID.
Underlying error (domain=IXErrorDomain, code=13):
Failed to get bundle ID from <path-to-project>/build-ios/MyApp_artefacts/Debug/Standalone/MyApp.app
Missing bundle ID.
However when I open the Info.plist file in the bundle, I can see the bundle ID is there:
<key>CFBundleIdentifier</key>
<string>com.MyCompany.MyApp</string>
Am I missing something here?
I’m doing this in terminal with the aim of scripting it, but I get the exact same errors if I go through the “normal” process of pressing Run in Xcode after the first cmake command above.
Thanks in advance for any help!
