Skip to content

feat(watchos): Apple Watch app + BTC price complication#654

Closed
islandbitcoin wants to merge 1 commit into
mainfrom
jabariennis/eng-459-featios-watchos-app-complication-for-flash-live-btc-price
Closed

feat(watchos): Apple Watch app + BTC price complication#654
islandbitcoin wants to merge 1 commit into
mainfrom
jabariennis/eng-459-featios-watchos-app-complication-for-flash-live-btc-price

Conversation

@islandbitcoin

Copy link
Copy Markdown
Contributor

What

Adds a native watchOS app and a WidgetKit complication to Flash that show a live BTC price on the watch and on any watch face. Built to mirror the conventions of the existing home-screen widget (ios/FlashWidget).

Linear: ENG-459https://linear.app/island-bitcoin/issue/ENG-459

Why

Glanceability. Users get the BTC price (in their display currency) on their wrist and watch face without opening the phone app — even when the phone is away.

How it works

  • Self-contained price fetch — the watch app and complication call the public, unauthenticated realtimePrice GraphQL query (https://api.flashapp.me/graphql), the same one the home-screen widget uses. Works before login; defaults to USD.
  • Watch-local App Group group.com.lnflash.watch shares the price snapshot between the watch app and its complication. (The iOS group.com.lnflash lives on a different device and can't be reused.)
  • WatchConnectivity carries the user's display currency phone → watch so the watch reprices in the chosen currency. Best-effort; the watch works standalone without it.
  • Complication uses WidgetKit accessory families (watchOS 9+): circular, inline, rectangular, corner. ClockKit (deprecated) is not used.
  • Quick actions — Scan/Receive in the watch app send a message to the phone, which opens flash://scan / flash://receive via the existing React Navigation linking (PREFIX_LINKING already includes flash://).

Files

Area Files
Watch app ios/FlashWatch Watch App/FlashWatchApp, ContentView, PriceService, WatchStore, PhoneConnectivity
Complication ios/FlashWatchComplication/ — bundle, provider, accessory views
Phone bridge ios/LNFlash/WatchConnectivityBridge.{swift,m}
JS glue app/utils/watch.ts, app/components/watch-currency-sync/ (mounted in app/graphql/client.tsx)
Docs ios/FlashWatch/SETUP.md

Reviewer / merge note

Creating the two watch Xcode targets edits project.pbxproj, which (per the widget's ios/FlashWidget/SETUP.md) is done in the Xcode GUI to avoid corrupting the project file. All Swift sources, Info.plists, and entitlements are scaffolded here; ios/FlashWatch/SETUP.md has the exact step-by-step (target creation, target membership, App Group, deployment target, build/run + complication install). The JS side is wired and active immediately and no-ops on Android / when no watch is paired.

Testing

  • TypeScript: the JS mirrors the proven widget-price-sync pattern; useDisplayCurrency() returns the exact fractionDigits / fiatSymbol / displayCurrency fields consumed. (Repo-wide tsc:check currently errors with a pre-existing TS5095 config issue on a clean main too — unrelated to this change.)
  • Native build is verified manually via SETUP.md (CI here has Command Line Tools only, no xcodebuild).

🤖 Generated with Claude Code

Adds a native watchOS app and a WidgetKit complication that show a live
BTC price on the watch and on any watch face, mirroring the conventions
of the existing home-screen widget (ios/FlashWidget).

- Watch app (SwiftUI): glanceable price, manual refresh, last-updated,
  and Scan/Receive quick actions handed off to the iPhone.
- Complication (WidgetKit, watchOS 9+): accessoryCircular, inline,
  rectangular, and corner families.
- Self-contained price fetch via the public unauthenticated realtimePrice
  query (works with the phone away / before login; defaults to USD).
- Watch-local App Group group.com.lnflash.watch shares the snapshot
  between the watch app and its complication.
- Phone-side WatchConnectivityBridge RN module pushes the user's display
  currency to the watch and opens flash:// deep links from watch actions;
  WatchCurrencySync wires it into the authed tree.
- ios/FlashWatch/SETUP.md documents Xcode target creation + wiring
  (pbxproj edited in the GUI, per repo convention).

Closes ENG-459

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@linear

linear Bot commented Jun 27, 2026

Copy link
Copy Markdown

ENG-459

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant