make ipa exporting easier
This commit is contained in:
9
run.sh
9
run.sh
@@ -3,20 +3,19 @@
|
||||
APP_NAME='ImageViewer'
|
||||
SIM_DEVICE='iPad Air 11-inch (M3)'
|
||||
SCHEME='ImageViewer'
|
||||
DERIVED_DATA="./build"
|
||||
SIMULATOR='iOS Simulator'
|
||||
COMPANY='ImageViewer'
|
||||
|
||||
[ -z "$BUILD_TYPE" ] && BUILD_TYPE=Debug
|
||||
DERIVED_DATA="./build"
|
||||
|
||||
sudo bash -c "echo '127.0.0.1 developerservices2.apple.com' >>/etc/hosts"
|
||||
|
||||
# Boot and launch simulator
|
||||
xcrun simctl boot "$SIM_DEVICE"
|
||||
open -a Simulator
|
||||
|
||||
# Build app
|
||||
xcodebuild -scheme "$SCHEME" -derivedDataPath "$DERIVED_DATA" -destination "platform=$SIMULATOR,name=$SIM_DEVICE"
|
||||
xcodebuild -scheme "$SCHEME" -configuration "$BUILD_TYPE" -derivedDataPath "$DERIVED_DATA/$BUILD_TYPE" -destination "platform=$SIMULATOR,name=$SIM_DEVICE"
|
||||
|
||||
# Install and launch
|
||||
APP_PATH="$DERIVED_DATA/Build/Products/Debug-iphonesimulator/$APP_NAME.app"
|
||||
xcrun simctl install booted "$APP_PATH"
|
||||
xcrun simctl spawn booted log stream --predicate 'process == "ImageViewer"' --style syslog &
|
||||
|
||||
Reference in New Issue
Block a user