#!/bin/sh set -eu cd "$(dirname "$0")/.." xcodegen generate --spec ios/project.yml case "${1:-simulator}" in simulator) xcodebuild -project ios/CalendarPhone.xcodeproj -scheme CalendarPhone -sdk iphonesimulator -destination 'generic/platform=iOS Simulator' -derivedDataPath build/ios CODE_SIGNING_ALLOWED=NO build ;; device) : "${OFICINA_DEVELOPMENT_TEAM:?Set your Apple development team ID}" xcodebuild -project ios/CalendarPhone.xcodeproj -scheme CalendarPhone -destination 'generic/platform=iOS' -derivedDataPath build/device "DEVELOPMENT_TEAM=$OFICINA_DEVELOPMENT_TEAM" -allowProvisioningUpdates build ;; *) echo 'Use simulator or device' >&2; exit 2 ;; esac