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>
44 lines
2.4 KiB
Swift
44 lines
2.4 KiB
Swift
// swift-tools-version: 5.9
|
|
import PackageDescription
|
|
|
|
// DO NOT MODIFY THIS FILE - managed by Capacitor CLI commands
|
|
let package = Package(
|
|
name: "CapApp-SPM",
|
|
platforms: [.iOS(.v15)],
|
|
products: [
|
|
.library(
|
|
name: "CapApp-SPM",
|
|
targets: ["CapApp-SPM"])
|
|
],
|
|
dependencies: [
|
|
.package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", exact: "8.3.1"),
|
|
.package(name: "CapacitorApp", path: "../../../node_modules/@capacitor/app"),
|
|
.package(name: "CapacitorGeolocation", path: "../../../node_modules/@capacitor/geolocation"),
|
|
.package(name: "CapacitorHaptics", path: "../../../node_modules/@capacitor/haptics"),
|
|
.package(name: "CapacitorLocalNotifications", path: "../../../node_modules/@capacitor/local-notifications"),
|
|
.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: "CapacitorNativeSettings", path: "../../../node_modules/capacitor-native-settings")
|
|
],
|
|
targets: [
|
|
.target(
|
|
name: "CapApp-SPM",
|
|
dependencies: [
|
|
.product(name: "Capacitor", package: "capacitor-swift-pm"),
|
|
.product(name: "Cordova", package: "capacitor-swift-pm"),
|
|
.product(name: "CapacitorApp", package: "CapacitorApp"),
|
|
.product(name: "CapacitorGeolocation", package: "CapacitorGeolocation"),
|
|
.product(name: "CapacitorHaptics", package: "CapacitorHaptics"),
|
|
.product(name: "CapacitorLocalNotifications", package: "CapacitorLocalNotifications"),
|
|
.product(name: "CapacitorPushNotifications", package: "CapacitorPushNotifications"),
|
|
.product(name: "CapacitorSplashScreen", package: "CapacitorSplashScreen"),
|
|
.product(name: "CapacitorStatusBar", package: "CapacitorStatusBar"),
|
|
.product(name: "CapgoCapacitorHealth", package: "CapgoCapacitorHealth"),
|
|
.product(name: "CapacitorNativeSettings", package: "CapacitorNativeSettings")
|
|
]
|
|
)
|
|
]
|
|
)
|