I'm using xcodebuild to build and install my app on the simulator (by copying the .app to ~/Library/Application Support/iPhone Simulator/6.1/Applications/UUID/) from the command line. I use:
xcodebuild -target MyApp
-configuration Debug
CPU_ARCHITECTURE=iphonesimulator6.1
install DSTROOT=Products
The .app is produced in /project_root/Products/Applications/MyApp.app However, every time I run the .app on my simulator, it crashes immediately.
I compared the .app that is created from Xcode's Run to xcodebuild's output from above. The two MyApp.apps are pretty much identical, but the MyApp binary inside of MyApp.app differ (the Xcode one is almost twice the memory footprint). I even tried copying the binary from Xcode's MyApp.app to xcodebuild's, and that worked too.
Any ideas why xcodebuild's .app is crashing?