2026-09-19 19:33:10 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
set -eu
|
|
|
|
|
|
2026-09-21 00:11:01 +02:00
|
|
|
root="$(CDPATH= cd -- "$(dirname -- "$0")/../.." && pwd)"
|
2026-09-19 19:33:10 +02:00
|
|
|
device="${VOICECAT_IOS_DEVICE:-}"
|
|
|
|
|
configuration="${CONFIGURATION:-Debug}"
|
|
|
|
|
build=true
|
|
|
|
|
console=false
|
|
|
|
|
|
|
|
|
|
while [ "$#" -gt 0 ]; do
|
|
|
|
|
case "$1" in
|
|
|
|
|
--device) device="$2"; shift 2 ;;
|
|
|
|
|
--configuration) configuration="$2"; shift 2 ;;
|
|
|
|
|
--no-build) build=false; shift ;;
|
|
|
|
|
--console) console=true; shift ;;
|
|
|
|
|
--list) xcrun devicectl list devices; exit 0 ;;
|
|
|
|
|
-h|--help)
|
|
|
|
|
echo "usage: $0 --device NAME-OR-UDID [--configuration Debug|Release] [--no-build] [--console]"
|
|
|
|
|
echo "use --list to show devices, or set VOICECAT_IOS_DEVICE"
|
|
|
|
|
exit 0 ;;
|
|
|
|
|
*) echo "unknown argument: $1" >&2; exit 2 ;;
|
|
|
|
|
esac
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
[ -n "$device" ] || { echo "pass --device NAME-OR-UDID or set VOICECAT_IOS_DEVICE" >&2; exit 2; }
|
|
|
|
|
app="$root/dist/ios-managed-device/VoiceCat.iOS.app"
|
2026-09-21 00:11:01 +02:00
|
|
|
if $build; then "$root/clients/apple/build-ios-device.sh" --configuration "$configuration"; fi
|
2026-09-19 19:33:10 +02:00
|
|
|
[ -d "$app" ] || { echo "managed device app not found at $app; run build-ios-device.sh first" >&2; exit 1; }
|
|
|
|
|
|
|
|
|
|
xcrun devicectl device install app --device "$device" "$app"
|
|
|
|
|
if $console; then
|
|
|
|
|
xcrun devicectl device process launch --device "$device" --terminate-existing --console me.iamtalon.voicecat
|
|
|
|
|
else
|
|
|
|
|
xcrun devicectl device process launch --device "$device" --terminate-existing me.iamtalon.voicecat
|
|
|
|
|
fi
|