Widget Saisie rapide : bundle, schéma d'URL et synchro câblés
Trois des étapes du runbook sont des fichiers texte, donc faisables hors Xcode : * `CoachQuickWidget()` enregistré dans `CoachLiveActivityBundle`, sous `if #available(iOS 17.0, *)` — le bundle sert aussi des cibles antérieures ; * schéma `coachapp://` déclaré dans l'Info.plist de l'App. Il n'y était pas : seul le schéma Google était présent, et les boutons Photo et Scanner du widget n'auraient donc rien ouvert ; * `CoachQuickSync.flush()` appelé depuis `applicationDidBecomeActive`, qui était un corps vide. Ne restent en manuel que les gestes qui touchent le projet Xcode lui-même : Target Membership des trois fichiers Swift, puis le build. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -50,7 +50,12 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
|||||||
func applicationWillResignActive(_ application: UIApplication) {}
|
func applicationWillResignActive(_ application: UIApplication) {}
|
||||||
func applicationDidEnterBackground(_ application: UIApplication) {}
|
func applicationDidEnterBackground(_ application: UIApplication) {}
|
||||||
func applicationWillEnterForeground(_ application: UIApplication) {}
|
func applicationWillEnterForeground(_ application: UIApplication) {}
|
||||||
func applicationDidBecomeActive(_ application: UIApplication) {}
|
func applicationDidBecomeActive(_ application: UIApplication) {
|
||||||
|
// Les saisies faites depuis le widget (eau, café) attendent dans l'App
|
||||||
|
// Group : une extension n'a ni session ni droit de tenir une requête.
|
||||||
|
// On les transmet ici, à chaque retour au premier plan.
|
||||||
|
Task { await CoachQuickSync.flush() }
|
||||||
|
}
|
||||||
func applicationWillTerminate(_ application: UIApplication) {}
|
func applicationWillTerminate(_ application: UIApplication) {}
|
||||||
|
|
||||||
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool {
|
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool {
|
||||||
|
|||||||
@@ -81,6 +81,14 @@
|
|||||||
<string>com.googleusercontent.apps.817483900105-amoanmsold3j3k71retpjuhvrknsuunh</string>
|
<string>com.googleusercontent.apps.817483900105-amoanmsold3j3k71retpjuhvrknsuunh</string>
|
||||||
</array>
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleURLName</key>
|
||||||
|
<string>ch.hypnotruck.coach.deeplink</string>
|
||||||
|
<key>CFBundleURLSchemes</key>
|
||||||
|
<array>
|
||||||
|
<string>coachapp</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
@@ -12,5 +12,7 @@ struct CoachLiveActivityBundle: WidgetBundle {
|
|||||||
CoachLiveActivityWidget()
|
CoachLiveActivityWidget()
|
||||||
CoachTodaySessionWidget()
|
CoachTodaySessionWidget()
|
||||||
CoachFormeScoreWidget()
|
CoachFormeScoreWidget()
|
||||||
|
// Saisie rapide : App Intents (iOS 17+) pour l'eau et le café.
|
||||||
|
if #available(iOS 17.0, *) { CoachQuickWidget() }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user