make ipa exporting easier

This commit is contained in:
2025-07-09 18:31:05 +02:00
parent f987e88f24
commit 7d4cbecbf2
6 changed files with 103 additions and 80 deletions

9
run.sh
View File

@@ -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 &