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")/../ios" |
| 6 | xcodegen generate --quiet |
| 7 | case "${1:-simulator}" in |
| 8 | simulator) |
| 9 | xcodebuild -project EquipoPhone.xcodeproj -scheme EquipoPhone -configuration Debug -sdk iphonesimulator \ |
| 10 | -destination 'generic/platform=iOS Simulator' -derivedDataPath ../build/Phone CODE_SIGNING_ALLOWED=NO build ;; |
| 11 | device) |
| 12 | : "${OFICINA_DEVELOPMENT_TEAM:?set OFICINA_DEVELOPMENT_TEAM to sign for a device}" |
| 13 | xcodebuild -project EquipoPhone.xcodeproj -scheme EquipoPhone -configuration Debug -sdk iphoneos \ |
| 14 | -destination 'generic/platform=iOS' -derivedDataPath ../build/Phone DEVELOPMENT_TEAM="$OFICINA_DEVELOPMENT_TEAM" -allowProvisioningUpdates build ;; |
| 15 | *) echo "usage: build-iphone.sh [simulator|device]" >&2; exit 2 ;; |
| 16 | esac |
| 17 | |