Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copy to .env.local and replace both placeholders with private local values.
HC_CODE_SIGN_IDENTITY="Apple Development identity name or certificate hash"
HC_EXPECTED_TEAM_ID="YOUR_TEAM_ID"
# Optional: the iOS app's team when it differs from HC_EXPECTED_TEAM_ID.
# HC_IOS_TEAM_ID="YOUR_IOS_TEAM_ID"
2 changes: 1 addition & 1 deletion apps/ios/voice_input/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
```bash
rustup target add aarch64-apple-ios aarch64-apple-ios-sim
scripts/check_ios.sh # Simulator build, unit and UI tests, local-only scan.
scripts/build_ios_device.sh # Signed device .app (reads .env.local); does not install.
scripts/build_ios_device.sh # Signed device .app (reads .env.local; HC_IOS_TEAM_ID picks its team).
scripts/install_ios.sh # Build, install, and launch on a connected iPhone.
```

Expand Down
12 changes: 7 additions & 5 deletions scripts/build_ios_device.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@ if [[ -f .env.local ]]; then
set +a
fi

[[ -n "${HC_EXPECTED_TEAM_ID:-}" ]] || {
print -u2 "HC_EXPECTED_TEAM_ID must be configured privately in .env.local."
# Voice Input may sign with a different team than the Mac app.
ios_team_id="${HC_IOS_TEAM_ID:-${HC_EXPECTED_TEAM_ID:-}}"
[[ -n "$ios_team_id" ]] || {
print -u2 "HC_IOS_TEAM_ID or HC_EXPECTED_TEAM_ID must be configured privately in .env.local."
exit 1
}

Expand All @@ -67,7 +69,7 @@ xcodebuild build -quiet \
-configuration "$build_configuration" \
-destination "generic/platform=iOS" \
-derivedDataPath "$derived_data" \
DEVELOPMENT_TEAM="$HC_EXPECTED_TEAM_ID" \
DEVELOPMENT_TEAM="$ios_team_id" \
CODE_SIGN_STYLE=Automatic

app_bundle="$derived_data/Build/Products/$build_product_directory/VoiceInput.app"
Expand Down Expand Up @@ -132,8 +134,8 @@ for signed_bundle in \
"$app_bundle"/PlugIns/*.appex; do
signed_team="$(codesign -dv --verbose=4 "$signed_bundle" 2>&1 \
| awk -F= '/^TeamIdentifier=/{print $2}')"
[[ "$signed_team" == "$HC_EXPECTED_TEAM_ID" ]] || {
print -u2 "$signed_bundle Team $signed_team does not match HC_EXPECTED_TEAM_ID."
[[ "$signed_team" == "$ios_team_id" ]] || {
print -u2 "$signed_bundle Team $signed_team does not match $ios_team_id."
exit 1
}
done
Expand Down
Loading