From 908c6b21410cfeb8b775ec9c6def7a44a3b725ba Mon Sep 17 00:00:00 2001 From: Sylvain Bettinelli Date: Sun, 10 May 2026 19:13:39 +0000 Subject: [PATCH] feat(ios): add capacitor-native-settings plugin pour deep-link iOS Settings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ajoute le plugin natif capacitor-native-settings@8.1.0 qui permet d'ouvrir directement la page Localisation dans Réglages iPhone via UIApplication.shared.open() (API officielle Apple). Cas d'usage : depuis /settings → Météo → bouton 'Gérer la permission iOS' → ouvre Réglages → Confidentialité → Localisation → Coach Hypnotruck. C'est ce qu'utilisent Strava, Komoot, Uber, etc. Sync ios/App/CapApp-SPM/Package.swift via npx cap sync ios — le plugin est maintenant inclus dans le build iOS. ⚠️ Requiert rebuild TestFlight v1.2 : cd /Users/sylvainbettinelli/Documents/coach-ios/ios/App pod install (ou via Xcode si SPM) Xcode → Product → Archive → upload TestFlight Côté webapp, le bouton tombera en fallback (instructions texte) tant que la nouvelle build TestFlight n'est pas installée. Le code détecte window.Capacitor.Plugins.NativeSettings et bascule selon dispo. Co-Authored-By: Claude Opus 4.7 (1M context) --- ios/App/CapApp-SPM/Package.swift | 6 ++++-- package-lock.json | 16 +++++++++++++--- package.json | 3 ++- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/ios/App/CapApp-SPM/Package.swift b/ios/App/CapApp-SPM/Package.swift index c0fd56d..3e36124 100644 --- a/ios/App/CapApp-SPM/Package.swift +++ b/ios/App/CapApp-SPM/Package.swift @@ -19,7 +19,8 @@ let package = Package( .package(name: "CapacitorPushNotifications", path: "../../../node_modules/@capacitor/push-notifications"), .package(name: "CapacitorSplashScreen", path: "../../../node_modules/@capacitor/splash-screen"), .package(name: "CapacitorStatusBar", path: "../../../node_modules/@capacitor/status-bar"), - .package(name: "CapgoCapacitorHealth", path: "../../../node_modules/@capgo/capacitor-health") + .package(name: "CapgoCapacitorHealth", path: "../../../node_modules/@capgo/capacitor-health"), + .package(name: "CapacitorNativeSettings", path: "../../../node_modules/capacitor-native-settings") ], targets: [ .target( @@ -34,7 +35,8 @@ let package = Package( .product(name: "CapacitorPushNotifications", package: "CapacitorPushNotifications"), .product(name: "CapacitorSplashScreen", package: "CapacitorSplashScreen"), .product(name: "CapacitorStatusBar", package: "CapacitorStatusBar"), - .product(name: "CapgoCapacitorHealth", package: "CapgoCapacitorHealth") + .product(name: "CapgoCapacitorHealth", package: "CapgoCapacitorHealth"), + .product(name: "CapacitorNativeSettings", package: "CapacitorNativeSettings") ] ) ] diff --git a/package-lock.json b/package-lock.json index b879d32..752f665 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "coach-ios", + "name": "coach-mobile", "version": "0.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "coach-ios", + "name": "coach-mobile", "version": "0.1.0", "license": "UNLICENSED", "dependencies": { @@ -19,7 +19,8 @@ "@capacitor/push-notifications": "^8.0.3", "@capacitor/splash-screen": "^8.0.1", "@capacitor/status-bar": "^8.0.2", - "@capgo/capacitor-health": "^8.4.9" + "@capgo/capacitor-health": "^8.4.9", + "capacitor-native-settings": "^8.1.0" }, "devDependencies": { "@capacitor/assets": "^3.0.5", @@ -1427,6 +1428,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/capacitor-native-settings": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/capacitor-native-settings/-/capacitor-native-settings-8.1.0.tgz", + "integrity": "sha512-bcIsKO0EBChdiG2l7RAt70cKxz0Vygfx7quN6tSoNlwziCct8f5EgT8xmwNit+7F712ojl54xNaEddu87EpkjQ==", + "license": "MIT", + "peerDependencies": { + "@capacitor/core": ">=8.0.2" + } + }, "node_modules/chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", diff --git a/package.json b/package.json index 21095ba..7a5f6a8 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,8 @@ "@capacitor/push-notifications": "^8.0.3", "@capacitor/splash-screen": "^8.0.1", "@capacitor/status-bar": "^8.0.2", - "@capgo/capacitor-health": "^8.4.9" + "@capgo/capacitor-health": "^8.4.9", + "capacitor-native-settings": "^8.1.0" }, "devDependencies": { "@capacitor/assets": "^3.0.5",