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