SPB Git

Repository Public

ios-build.sh 983 B 16 lines shellscript

1#!/usr/bin/env bash2# Builds SP Browser for iOS (simulator, Debug) and prints only errors, warnings and the result.3# Usage: scripts/ios-build.sh [simulator name]   (default: "SPBrowser iPhone"; created from iPhone 17 Pro if missing)4set -uo pipefail5cd "$(dirname "$0")/.."6NAME="${1:-SPBrowser iPhone}"7if ! xcrun simctl list devices available | grep -q "    $NAME ("; then8  TYPE="iPhone 17 Pro"; case "$NAME" in *iPad*) TYPE="com.apple.CoreSimulator.SimDeviceType.iPad-Pro-13-inch-M5-12GB";; esac9  xcrun simctl create "$NAME" "$TYPE" >/dev/null || { echo "cannot create simulator $NAME ($TYPE)"; exit 1; }10fi11command -v xcodegen >/dev/null && xcodegen generate --quiet12xcodebuild -project SPBrowser.xcodeproj -scheme SPBrowserMobile -configuration Debug \13  -derivedDataPath build/DerivedData-iOS -destination "platform=iOS Simulator,name=$NAME" build 2>&1 \14  | grep -E "^/.*(error|warning):|error:|BUILD (SUCCEEDED|FAILED)" | sed "s|$PWD/||" | sort -u15exit "${PIPESTATUS[0]}"16
Files main
Menu

Theme