I've tried reading the Xcode Tools documentation Apple provides, so that I can use the Terminal to build a .app
file and run the resulting app on the Simulator. Essentially what I want to do is do the same thing as Cmd
+ R
does on Xcode.
So far I've attempted to build my .xcodeproj
like this:
xcodebuild -configuration Debug build
However, when I install & run it on the Simulator I get an app w/ a black screen:
// Boot device
xcrun simctl boot "iPhone 7"
// Install app
xcrun simctl install "iPhone 7" "/Users/.../MyApp/build/Debug-iphoneos/MyApp.app"
// Open simulator
open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app
// Launch app using its bundle id
xcrun simctl launch booted "com.example.apps.MyApp"
Not to mention the xcrun simctl launch booted "com.example.apps.MyApp"
line never terminates and on the Simulator it keeps trying to open and reopen the app, but the app only ever shows a black screen.
If anyone could tell me what I'm doing wrong with the building of the.xcodeproj
that would be great!