Last active
August 15, 2023 16:28
-
-
Save oguzhanvarsak/f70ed597c833926df7c664e1a39bb86f to your computer and use it in GitHub Desktop.
Install the App to Simulator Using xcodebuild
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This script creates the .app file from the project, | |
# saves it into a path, | |
# runs the simulator | |
# and installs the app. | |
#!/bin/bash | |
xcodebuild -workspace <workspace name>.xcworkspace \ | |
-scheme <scheme name> \ | |
-sdk iphonesimulator \ | |
-destination 'platform=iOS Simulator,name=iPhone 14,OS=16.4' \ | |
clean build install DSTROOT=./App # `DSTROOT=` sets the path of generated .app file. | |
xcrun simctl boot "iPhone 14" # Boot the simulator | |
xcrun simctl install booted ./App/Applications/<app name>.app # Install the App file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment