From 92dcc08d5904bbafac7642504fbf458370d577f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zo=C3=AB?= Date: Tue, 18 Aug 2026 10:34:00 +0200 Subject: [PATCH] fix(watch): rename watch target to SwimBuddy Watch for Xcode compatibility --- app.json | 2 +- scripts/add-sentry-watch.js | 6 +++--- targets/watch/expo-target.config.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app.json b/app.json index e8746ef..ef0099f 100644 --- a/app.json +++ b/app.json @@ -99,7 +99,7 @@ "appExtensions": [ { "bundleIdentifier": "nl.guido-it.swimbuddy.watch", - "targetName": "SwimBuddy", + "targetName": "SwimBuddy Watch", "entitlements": { "com.apple.security.application-groups": [ "group.nl.guido-it.swimbuddy" diff --git a/scripts/add-sentry-watch.js b/scripts/add-sentry-watch.js index 17632b0..6bac7ff 100644 --- a/scripts/add-sentry-watch.js +++ b/scripts/add-sentry-watch.js @@ -43,7 +43,7 @@ if (content.includes(SENTRY_REPO_URL)) { // ── Find watch target UUID ── const watchTargetMatch = content.match( - /(\w{24})\s*\/\* SwimBuddy \*\/\s*=\s*\{\s*\n\s*isa = PBXNativeTarget;\s*\n\s*buildConfigurationList = XX792EB48D81CD7C6C71DCXX/ + /(\w{24})\s*\/\* SwimBuddy Watch \*\/\s*=\s*\{\s*\n\s*isa = PBXNativeTarget;\s*\n\s*buildConfigurationList = \w+ / ); if (!watchTargetMatch) { console.error("Watch target not found"); @@ -55,7 +55,7 @@ console.log(`Watch target: ${watchTargetUuid}`); // ── Find watch target's Frameworks build phase UUID ── const watchTargetBlock = content.match( new RegExp( - `${watchTargetUuid}\\s*\\/\\* SwimBuddy \\*\\/\\s*=\\s*\\{[\\s\\S]*?buildPhases\\s*=\\s*\\(([\\s\\S]*?)\\);` + `${watchTargetUuid}\\s*\\/\\* SwimBuddy Watch \\*\\/\\s*=\\s*\\{[\\s\\S]*?buildPhases\\s*=\\s*\\(([\\s\\S]*?)\\);` ) ); if (!watchTargetBlock) { @@ -143,7 +143,7 @@ if (!content.includes("packageReferences = (")) { const prodDepComment = `${prodDepId} /* ${SENTRY_PRODUCT} */`; // Find the watch target block and check if packageProductDependencies exists const wtPattern = new RegExp( - `(${watchTargetUuid}\\s*\\/\\* SwimBuddy \\*\\/ = \\{[\\s\\S]*?fileSystemSynchronizedGroups = \\([\\s\\S]*?\\);[\\s\\S]*?)(name = )` + `(${watchTargetUuid}\\s*\\/\\* SwimBuddy Watch \\*\\/ = \\{[\\s\\S]*?fileSystemSynchronizedGroups = \\([\\s\\S]*?\\);[\\s\\S]*?)(name = )` ); const wtMatch = content.match(wtPattern); if (wtMatch && !content.includes("packageProductDependencies")) { diff --git a/targets/watch/expo-target.config.js b/targets/watch/expo-target.config.js index a939029..14cb869 100644 --- a/targets/watch/expo-target.config.js +++ b/targets/watch/expo-target.config.js @@ -1,6 +1,6 @@ /** @type {import('@bacons/apple-targets/app.plugin').ConfigFunction} */ module.exports = (config) => ({ - name: config.name, + name: `${config.name} Watch`, type: "watch", icon: "../../assets/icon.png", deploymentTarget: "10.0",