feat(ios): add capacitor-native-settings plugin pour deep-link iOS Settings

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) <noreply@anthropic.com>
This commit is contained in:
Sylvain Bettinelli
2026-05-10 19:13:39 +00:00
parent a251d369df
commit 908c6b2141
3 changed files with 19 additions and 6 deletions

View File

@@ -19,7 +19,8 @@ let package = Package(
.package(name: "CapacitorPushNotifications", path: "../../../node_modules/@capacitor/push-notifications"), .package(name: "CapacitorPushNotifications", path: "../../../node_modules/@capacitor/push-notifications"),
.package(name: "CapacitorSplashScreen", path: "../../../node_modules/@capacitor/splash-screen"), .package(name: "CapacitorSplashScreen", path: "../../../node_modules/@capacitor/splash-screen"),
.package(name: "CapacitorStatusBar", path: "../../../node_modules/@capacitor/status-bar"), .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: [ targets: [
.target( .target(
@@ -34,7 +35,8 @@ let package = Package(
.product(name: "CapacitorPushNotifications", package: "CapacitorPushNotifications"), .product(name: "CapacitorPushNotifications", package: "CapacitorPushNotifications"),
.product(name: "CapacitorSplashScreen", package: "CapacitorSplashScreen"), .product(name: "CapacitorSplashScreen", package: "CapacitorSplashScreen"),
.product(name: "CapacitorStatusBar", package: "CapacitorStatusBar"), .product(name: "CapacitorStatusBar", package: "CapacitorStatusBar"),
.product(name: "CapgoCapacitorHealth", package: "CapgoCapacitorHealth") .product(name: "CapgoCapacitorHealth", package: "CapgoCapacitorHealth"),
.product(name: "CapacitorNativeSettings", package: "CapacitorNativeSettings")
] ]
) )
] ]

16
package-lock.json generated
View File

@@ -1,11 +1,11 @@
{ {
"name": "coach-ios", "name": "coach-mobile",
"version": "0.1.0", "version": "0.1.0",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "coach-ios", "name": "coach-mobile",
"version": "0.1.0", "version": "0.1.0",
"license": "UNLICENSED", "license": "UNLICENSED",
"dependencies": { "dependencies": {
@@ -19,7 +19,8 @@
"@capacitor/push-notifications": "^8.0.3", "@capacitor/push-notifications": "^8.0.3",
"@capacitor/splash-screen": "^8.0.1", "@capacitor/splash-screen": "^8.0.1",
"@capacitor/status-bar": "^8.0.2", "@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": { "devDependencies": {
"@capacitor/assets": "^3.0.5", "@capacitor/assets": "^3.0.5",
@@ -1427,6 +1428,15 @@
"url": "https://github.com/sponsors/sindresorhus" "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": { "node_modules/chalk": {
"version": "2.4.2", "version": "2.4.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",

View File

@@ -25,7 +25,8 @@
"@capacitor/push-notifications": "^8.0.3", "@capacitor/push-notifications": "^8.0.3",
"@capacitor/splash-screen": "^8.0.1", "@capacitor/splash-screen": "^8.0.1",
"@capacitor/status-bar": "^8.0.2", "@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": { "devDependencies": {
"@capacitor/assets": "^3.0.5", "@capacitor/assets": "^3.0.5",