Download this file
| 1 | #!/bin/sh |
| 2 | # The iPhone app. "simulator" builds unsigned for the iOS Simulator; |
| 3 | # "device" signs for a phone with OFICINA_DEVELOPMENT_TEAM set. |
| 4 | set -eu |
| 5 | cd "$(dirname "$0")/.." |
| 6 | scripts/fonts-into-bundle.sh |
| 7 | cd ios |
| 8 | xcodegen generate --quiet |
| 9 | case "${1:-simulator}" in |
| 10 | simulator) |
| 11 | xcodebuild -project BasePhone.xcodeproj -scheme BasePhone -configuration Debug -sdk iphonesimulator \ |
| 12 | -destination 'generic/platform=iOS Simulator' -derivedDataPath ../build/Phone CODE_SIGNING_ALLOWED=NO build ;; |
| 13 | device) |
| 14 | : "${OFICINA_DEVELOPMENT_TEAM:?set OFICINA_DEVELOPMENT_TEAM to sign for a device}" |
| 15 | xcodebuild -project BasePhone.xcodeproj -scheme BasePhone -configuration Debug -sdk iphoneos \ |
| 16 | -destination 'generic/platform=iOS' -derivedDataPath ../build/Phone DEVELOPMENT_TEAM="$OFICINA_DEVELOPMENT_TEAM" -allowProvisioningUpdates build ;; |
| 17 | *) echo "usage: build-iphone.sh [simulator|device]" >&2; exit 2 ;; |
| 18 | esac |
| 19 | |