I'm in the middle of some proof of concept test of mine, using xcodebuild and xcrun in order to create and deploy an .app onto my ios Simulators (or even to deliver the .app directory to my final client).
Whatever, the thing is I deal sucessfully with all the many needed steps to create from scratch the .app file (well, directory), but then I get an app crash after I execute these next 2 lines, particularly the second one, once I try to upload and then run the .app onto the simulator:
xcrun simctl install booted $(PWD)/build/Debug-iphoneos/APP_NAME.app
xcrun simctl launch booted somebundle.id.from.me <- CRASH
No matter what I try, that xcrun command yields this error onto system.log:
Error Domain=FBSOpenApplicationErrorDomain Code=1 "(null)"
Apparently my app gets installed onto the simulator (I've erased it many times to create a fresh install), it even boots (the splash screen grows from the icon appearing on the simulator desktop), but the first thing I get when I expect the app to pass the splash screen, is that beforementioned crash line error (in system.log file).
Some people say I might have some phantom empty variable floating around in my schemas definition panel. I've checked it and it's not the case. No variables whatsoever.
Some other people say old versions of the app might be alive in the task scheduler of the Simulator. Indeed, sometimes I have found my task there as an old task from the past, but pressing "home" twice to go to the simulator task manager, killing it, and trying to relaunch my .app file with xcrun again does nothing, the crahs is still there. I even stop old executions of the same app launched from Xcode itself (with the STOP button), but no luck.
So, I'm definitely lost. I can't launch my recently created .app onto the simulator via command line.
It has failed with a 9.3 (iPhone 4s) simulator, and with a 9.3 (iPhone 6plus) simulator. My XCode Tools are the ones included in my XCode 7.3.1. I'm using "El Capitán".
I can't think of anything else.
I'd like to be able to upload AND run my .app via "command line tools". I hope it's possible somehow, or at least it seems I'm really close to success.
Any other hint I might have overlooked?
Greetings and thanks.