Commit Graph

8 Commits

Author SHA1 Message Date
Sylvain Bettinelli
7818f7b663 Init Android platform via cap add android
Génère la structure Capacitor Android (gradle + manifest + activity Java/Kotlin)
avec applicationId 'ch.hypnotruck.coach' (cohérent avec iOS), minSdk 24, target 36.

8 plugins synchronisés au passage (déjà déclarés dans package.json) :
@capacitor/{app,geolocation,haptics,local-notifications,push-notifications,
splash-screen,status-bar} et @capgo/capacitor-health.

Build APK toujours bloqué côté infra (Android SDK non installé sur cette machine,
+ attente validation Play Console pour signing/upload). Mais la structure est
prête : `cap sync` après modification du web puis `./gradlew assembleDebug`
sur une machine avec Android SDK.

Étape suivante : configurer permissions Health Connect dans AndroidManifest +
sync iOS pour cohérence cross-platform.
2026-05-07 16:26:30 +00:00
Sylvain Bettinelli
a7809992a9 Enregistre CoachAuth.swift dans project.pbxproj
Évite l'étape manuelle Add Files dans Xcode. Le fichier sera
automatiquement compilé dès qu'il existe dans ios/App/App/CoachAuth.swift.
2026-05-05 19:33:30 +00:00
Sylvain Bettinelli
50a8db9830 Inject auth cookie native dans AppDelegate au lancement
Évite le redirect 303 du backend /login qui casse WKWebView (WebKitErrorDomain
code 102, frame load interrupted by policy change). Le cookie est posé
directement dans HTTPCookieStorage.shared avec les bons attributs (domain
coach.hypnotruck.ch, path /, secure, expire 1 an).

Token lu depuis CoachAuth.kCoachWebToken défini dans CoachAuth.swift
(gitignored). Template fourni dans CoachAuth.swift.example.

Setup côté Mac mini :
1. cp ios/App/App/CoachAuth.swift.example ios/App/App/CoachAuth.swift
2. Éditer pour mettre la vraie valeur du token
3. Dans Xcode, Right-click App folder → Add Files → sélectionner CoachAuth.swift
2026-05-05 19:31:38 +00:00
Sylvain
6e3f74209b Init iOS project (cap add ios) avec privacy keys et entitlements 2026-05-05 21:29:17 +02:00
Sylvain Bettinelli
5f3144c2ec Gitignore CoachAuth.swift (contient le token WebView injecté natif) 2026-05-05 19:27:16 +00:00
Sylvain Bettinelli
b64a4029e7 Revert auto-login via /login?token=... — WKWebView casse le redirect 303
WebKit error code 102 (Frame load interrupted by policy change) sur le redirect
303 retourné par /login après pose du cookie. Solution Phase 0 : laisser le
user saisir le token une fois via le formulaire /login standard, le cookie
coach_web_token (1 an, secure, httponly, samesite=lax) doit persister dans
WKWebView pour les lancements suivants.

Si la persistance cookie échoue : inject natif via AppDelegate.swift à venir.
2026-05-05 19:24:14 +00:00
Sylvain Bettinelli
3e71dbe3a3 Auto-login via token coach_web_token au lancement
- capacitor.config.ts charge coachWebToken depuis coach-ios.local.json (gitignored)
- server.url devient https://coach.hypnotruck.ch/login?token=... → backend pose le cookie 1 an, redirige vers /
- Au prochain lancement, le cookie tient → /login?token redirige direct vers /
- coach-ios.local.json.example fourni pour setup Mac mini
2026-05-05 19:15:59 +00:00
Sylvain Bettinelli
1d82ec8b10 Init Coach Hypnotruck iOS — Capacitor 8 wrapper
- Capacitor 8 + plugins natifs (push, local-notif, geoloc, HealthKit Capgo, splash, status bar, haptics)
- Config pointe vers https://coach.hypnotruck.ch (server.url)
- Icône 1024×1024 + splash 2732×2732 depuis icon-512 PWA coach_sportif
- README complet avec procédure build sur Mac mini
- Bundle ID : ch.hypnotruck.coach, App name : Coach Hypnotruck
2026-05-05 16:17:11 +00:00