Apple Watch app config changes for publishing

This commit is contained in:
James Babcock committed 2026-11-08 01:36:54 -08:00
1 parent 5e3f58764c
commit 70ec2a0d6a
5 files changed
+63 -8

No files matched your search

@@ -224,12 +224,12 @@
INFOPLIST_KEY_CFBundleDisplayName = Faceclaw; INFOPLIST_KEY_CFBundleDisplayName = Faceclaw;
INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
INFOPLIST_KEY_WKCompanionAppBundleIdentifier = "$(FACECLAW_IOS_BUNDLE_ID)"; INFOPLIST_KEY_WKCompanionAppBundleIdentifier = "$(FACECLAW_IOS_BUNDLE_ID)";
INFOPLIST_KEY_WKRunsIndependentlyOfCompanionApp = YES; INFOPLIST_KEY_WKRunsIndependentlyOfCompanionApp = NO;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
PRODUCT_BUNDLE_IDENTIFIER = "$(FACECLAW_IOS_BUNDLE_ID).watchkitapp"; PRODUCT_BUNDLE_IDENTIFIER = "$(FACECLAW_IOS_BUNDLE_ID).watchremote";
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES; SKIP_INSTALL = YES;
SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_EMIT_LOC_STRINGS = YES;
@@ -245,12 +245,12 @@
INFOPLIST_KEY_CFBundleDisplayName = Faceclaw; INFOPLIST_KEY_CFBundleDisplayName = Faceclaw;
INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
INFOPLIST_KEY_WKCompanionAppBundleIdentifier = "$(FACECLAW_IOS_BUNDLE_ID)"; INFOPLIST_KEY_WKCompanionAppBundleIdentifier = "$(FACECLAW_IOS_BUNDLE_ID)";
INFOPLIST_KEY_WKRunsIndependentlyOfCompanionApp = YES; INFOPLIST_KEY_WKRunsIndependentlyOfCompanionApp = NO;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
PRODUCT_BUNDLE_IDENTIFIER = "$(FACECLAW_IOS_BUNDLE_ID).watchkitapp"; PRODUCT_BUNDLE_IDENTIFIER = "$(FACECLAW_IOS_BUNDLE_ID).watchremote";
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES; SKIP_INSTALL = YES;
SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_EMIT_LOC_STRINGS = YES;
@@ -261,7 +261,7 @@
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
PRODUCT_BUNDLE_IDENTIFIER = "$(FACECLAW_IOS_BUNDLE_ID).watchkitapp.uitests"; PRODUCT_BUNDLE_IDENTIFIER = "$(FACECLAW_IOS_BUNDLE_ID).watchremote.uitests";
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = NO; SWIFT_EMIT_LOC_STRINGS = NO;
TEST_TARGET_NAME = Faceclaw; TEST_TARGET_NAME = Faceclaw;
@@ -272,7 +272,7 @@
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
PRODUCT_BUNDLE_IDENTIFIER = "$(FACECLAW_IOS_BUNDLE_ID).watchkitapp.uitests"; PRODUCT_BUNDLE_IDENTIFIER = "$(FACECLAW_IOS_BUNDLE_ID).watchremote.uitests";
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = NO; SWIFT_EMIT_LOC_STRINGS = NO;
TEST_TARGET_NAME = Faceclaw; TEST_TARGET_NAME = Faceclaw;
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<!-- Crown sensitivity is stored in the watch app's own preferences. -->
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array><string>CA92.1</string></array>
</dict>
<dict>
<!-- The monotonic clock measures touch durations and gesture deadlines. -->
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategorySystemBootTime</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array><string>35F9.1</string></array>
</dict>
</array>
</dict>
</plist>
+29 -1
View File
@@ -112,9 +112,37 @@ xcrun devicectl device capture screenshot --device <watch-udid> --destination wa
A hook (`scripts/apple-watch-embed.cjs`) adds the watch project to the generated iOS A hook (`scripts/apple-watch-embed.cjs`) adds the watch project to the generated iOS
project after each prepare, and takes it back out if the setting is removed. The project after each prepare, and takes it back out if the setting is removed. The
bundle ID follows `IOS_BUNDLE_ID` (the watch app's is `<that>.watchkitapp`) and the bundle ID follows `IOS_BUNDLE_ID` (the watch app's is `<that>.watchremote`) and the
version follows `app/version.ts`. version follows `app/version.ts`.
### TestFlight releases
Build the iPhone release with embedding enabled:
```bash
FACECLAW_EMBED_WATCH=1 npm run build:ios -- --release
```
Keep `FACECLAW_EMBED_WATCH=1` in `build_paths.sh` if that file sets the option.
Distribute the resulting `platforms/ios/build/Release-iphoneos/faceclaw.xcarchive`
through Xcode Organizer using App Store Connect. The watch companion travels inside
the iOS archive; do not upload the standalone watch development build.
Before uploading, check that `Products/Applications/faceclaw.app/Watch/Faceclaw.app`
exists in the archive. Its bundle ID must be `com.faceclaw.app.watchremote` for the
public release, with `WKCompanionAppBundleIdentifier` set to `com.faceclaw.app`.
Both apps must have the same version and build number; the hook copies the build
number from `App_Resources/iOS/Info.plist`. The watch app is dependent on the phone
app, and includes its own privacy manifest for preferences and gesture timing.
Include UUID-matching debug symbols for both apps and their embedded frameworks in
the archive's `dSYMs` directory. Name the watch symbol bundle
`FaceclawWatch.app.dSYM` when copying it from `Release-watchos/Faceclaw.app.dSYM`,
so it doesn't overwrite the phone's `faceclaw.app.dSYM` on a case-insensitive disk.
After Apple processes the upload, verify that
TestFlight's build metadata recognizes the Apple Watch companion before adding it
to Public Beta.
## Testing ## Testing
```bash ```bash
+4
View File
@@ -26,10 +26,14 @@ function embedEnabled() {
/** Xcode's own builds of the watch project read this too, so they sign the same way. */ /** Xcode's own builds of the watch project read this too, so they sign the same way. */
function writeLocalConfig() { function writeLocalConfig() {
const version = /FACECLAW_VERSION = "(.*)"/.exec(fs.readFileSync(path.join(root, 'app/version.ts'), 'utf8'))[1]; const version = /FACECLAW_VERSION = "(.*)"/.exec(fs.readFileSync(path.join(root, 'app/version.ts'), 'utf8'))[1];
const build = execFileSync('/usr/libexec/PlistBuddy', [
'-c', 'Print :CFBundleVersion', path.join(root, 'App_Resources/iOS/Info.plist'),
], { encoding: 'utf8' }).trim();
const lines = [ const lines = [
`FACECLAW_IOS_BUNDLE_ID = ${process.env.IOS_BUNDLE_ID || 'com.faceclaw.app'}`, `FACECLAW_IOS_BUNDLE_ID = ${process.env.IOS_BUNDLE_ID || 'com.faceclaw.app'}`,
// An embedded watch app has to carry the phone app's version. // An embedded watch app has to carry the phone app's version.
`MARKETING_VERSION = ${version}`, `MARKETING_VERSION = ${version}`,
`CURRENT_PROJECT_VERSION = ${build}`,
]; ];
if (process.env.IOS_TEAM_ID) lines.push(`DEVELOPMENT_TEAM = ${process.env.IOS_TEAM_ID}`); if (process.env.IOS_TEAM_ID) lines.push(`DEVELOPMENT_TEAM = ${process.env.IOS_TEAM_ID}`);
fs.writeFileSync(path.join(root, 'apple-watch/Local.xcconfig'), `${lines.join('\n')}\n`); fs.writeFileSync(path.join(root, 'apple-watch/Local.xcconfig'), `${lines.join('\n')}\n`);
+1 -1
View File
@@ -199,7 +199,7 @@ do {
state.battery = 50 state.battery = 50
state.caseBattery = 64 state.caseBattery = 64
state.caseCharging = true state.caseCharging = true
check(padLine(state: state, link: up) == StatusLine(text: "Charging · G2 50%", tone: .busy, detail: "Case 64% ⚡"), "charging") check(padLine(state: state, link: up) == StatusLine(text: "Charging: G2 50%", tone: .busy, detail: "Case 64% ⚡"), "charging")
var off = PhoneState() var off = PhoneState()
check(padLine(state: off, link: up).text == "Disconnected", "disconnected") check(padLine(state: off, link: up).text == "Disconnected", "disconnected")