Files
voice-cat/clients/apple/deploy-ios-device.sh
Talon 08e6c5930a
Build and test / test (macos-latest) (push) Canceled after 0s
Build and test / test (ubuntu-24.04) (push) Canceled after 0s
Build and test / test (windows-latest) (push) Canceled after 0s
Build and test / apple-client (push) Canceled after 0s
Retire legacy implementations and flatten managed layout
2026-09-21 00:11:32 +02:00

36 lines
1.4 KiB
Bash
Executable File

#!/bin/sh
set -eu
root="$(CDPATH= cd -- "$(dirname -- "$0")/../.." && pwd)"
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"
if $build; then "$root/clients/apple/build-ios-device.sh" --configuration "$configuration"; fi
[ -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