DocsApple Watch
Native watchOS + iOS companion app
Apple Watch Companion App
Surflink ships a native Apple Watch + iOS companion in the apple/ directory, built with SwiftUI and managed by XcodeGen.
Targets
| Target | Platform | Description |
|---|---|---|
| SurfLink | iOS 17+ | Companion app for auth + watch pairing |
| SurfLinkWatch | watchOS 10+ | Coach and student watch interfaces |
| SurfLinkWidgets | watchOS 10+ | WidgetKit complications |
| Shared | Swift Package | Shared models, services, connectivity |
Layout
apple/
├── project.yml # XcodeGen project definition
├── Shared/ # Swift package: Models, Services, Extensions
├── SurfLink/ # iOS companion (entry, Views, Services)
├── SurfLinkWatch/ # watchOS app (CoachViews, StudentViews, Components)
└── SurfLinkWidgets/ # WidgetKit complications
Generate and open
cd apple
xcodegen generate
open SurfLink.xcodeproj
Prerequisites: Xcode 16+, brew install xcodegen, and an Apple Developer account with watchOS provisioning.
Features
- iOS companion: Supabase login, watch pairing (auth tokens transferred via WatchConnectivity), settings.
- Coach watch app: session overview, quick actions (timer, notifications), roster, conditions.
- Student watch app: drill timer, session status, achievement haptics, quick stats.
- Complications: next lesson, conditions, session count, streak.
Auth and push
The iOS app logs in via Supabase and transfers tokens to the watch, which stores them in the Keychain and uses the shared AuthService to refresh. The watch registers for APNs and records its token in push_tokens, so web-originated notifications (lessons, achievements, messages) arrive on the wrist.