Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@kastiglione
Last active July 30, 2019 15:26
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kastiglione/39b9d63dd89976339f2c8fe72f4c24e2 to your computer and use it in GitHub Desktop.
Save kastiglione/39b9d63dd89976339f2c8fe72f4c24e2 to your computer and use it in GitHub Desktop.
Build & Run iPhone simulator code outside of Xcode
#!/bin/bash
set -e
_xcrun() {
DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer \
xcrun -sdk iphonesimulator \
"$@"
}
_xcrun swiftc \
-target x86_64-apple-ios13.0-simulator \
-o runme \
"$@"
_xcrun simctl spawn -s "iPhone 8" ./runme
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment