diff --git a/apple-watch/Faceclaw.xcodeproj/project.pbxproj b/apple-watch/Faceclaw.xcodeproj/project.pbxproj
index 492f5d64..11f5a3a4 100644
--- a/apple-watch/Faceclaw.xcodeproj/project.pbxproj
+++ b/apple-watch/Faceclaw.xcodeproj/project.pbxproj
@@ -224,12 +224,12 @@
INFOPLIST_KEY_CFBundleDisplayName = Faceclaw;
INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
INFOPLIST_KEY_WKCompanionAppBundleIdentifier = "$(FACECLAW_IOS_BUNDLE_ID)";
- INFOPLIST_KEY_WKRunsIndependentlyOfCompanionApp = YES;
+ INFOPLIST_KEY_WKRunsIndependentlyOfCompanionApp = NO;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
- PRODUCT_BUNDLE_IDENTIFIER = "$(FACECLAW_IOS_BUNDLE_ID).watchkitapp";
+ PRODUCT_BUNDLE_IDENTIFIER = "$(FACECLAW_IOS_BUNDLE_ID).watchremote";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
@@ -245,12 +245,12 @@
INFOPLIST_KEY_CFBundleDisplayName = Faceclaw;
INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
INFOPLIST_KEY_WKCompanionAppBundleIdentifier = "$(FACECLAW_IOS_BUNDLE_ID)";
- INFOPLIST_KEY_WKRunsIndependentlyOfCompanionApp = YES;
+ INFOPLIST_KEY_WKRunsIndependentlyOfCompanionApp = NO;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
- PRODUCT_BUNDLE_IDENTIFIER = "$(FACECLAW_IOS_BUNDLE_ID).watchkitapp";
+ PRODUCT_BUNDLE_IDENTIFIER = "$(FACECLAW_IOS_BUNDLE_ID).watchremote";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
@@ -261,7 +261,7 @@
isa = XCBuildConfiguration;
buildSettings = {
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)";
SWIFT_EMIT_LOC_STRINGS = NO;
TEST_TARGET_NAME = Faceclaw;
@@ -272,7 +272,7 @@
isa = XCBuildConfiguration;
buildSettings = {
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)";
SWIFT_EMIT_LOC_STRINGS = NO;
TEST_TARGET_NAME = Faceclaw;
diff --git a/apple-watch/Faceclaw/PrivacyInfo.xcprivacy b/apple-watch/Faceclaw/PrivacyInfo.xcprivacy
new file mode 100644
index 00000000..ef7bb226
--- /dev/null
+++ b/apple-watch/Faceclaw/PrivacyInfo.xcprivacy
@@ -0,0 +1,23 @@
+
+
+
+
+ NSPrivacyAccessedAPITypes
+
+
+
+ NSPrivacyAccessedAPIType
+ NSPrivacyAccessedAPICategoryUserDefaults
+ NSPrivacyAccessedAPITypeReasons
+ CA92.1
+
+
+
+ NSPrivacyAccessedAPIType
+ NSPrivacyAccessedAPICategorySystemBootTime
+ NSPrivacyAccessedAPITypeReasons
+ 35F9.1
+
+
+
+
diff --git a/apple-watch/README.md b/apple-watch/README.md
index ca107eab..c510e8c6 100644
--- a/apple-watch/README.md
+++ b/apple-watch/README.md
@@ -112,9 +112,37 @@ xcrun devicectl device capture screenshot --device --destination wa
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
-bundle ID follows `IOS_BUNDLE_ID` (the watch app's is `.watchkitapp`) and the
+bundle ID follows `IOS_BUNDLE_ID` (the watch app's is `.watchremote`) and the
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
```bash
diff --git a/scripts/apple-watch-embed.cjs b/scripts/apple-watch-embed.cjs
index 2c2dc392..a8796c43 100644
--- a/scripts/apple-watch-embed.cjs
+++ b/scripts/apple-watch-embed.cjs
@@ -26,10 +26,14 @@ function embedEnabled() {
/** Xcode's own builds of the watch project read this too, so they sign the same way. */
function writeLocalConfig() {
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 = [
`FACECLAW_IOS_BUNDLE_ID = ${process.env.IOS_BUNDLE_ID || 'com.faceclaw.app'}`,
// An embedded watch app has to carry the phone app's version.
`MARKETING_VERSION = ${version}`,
+ `CURRENT_PROJECT_VERSION = ${build}`,
];
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`);
diff --git a/tests/native/apple-watch/main.swift b/tests/native/apple-watch/main.swift
index f9121be1..3853f01b 100644
--- a/tests/native/apple-watch/main.swift
+++ b/tests/native/apple-watch/main.swift
@@ -199,7 +199,7 @@ do {
state.battery = 50
state.caseBattery = 64
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()
check(padLine(state: off, link: up).text == "Disconnected", "disconnected")