feat(watchos): Apple Watch app + BTC price complication#654
Closed
islandbitcoin wants to merge 1 commit into
Closed
feat(watchos): Apple Watch app + BTC price complication#654islandbitcoin wants to merge 1 commit into
islandbitcoin wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-459 — https://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
realtimePriceGraphQL query (https://api.flashapp.me/graphql), the same one the home-screen widget uses. Works before login; defaults to USD.group.com.lnflash.watchshares the price snapshot between the watch app and its complication. (The iOSgroup.com.lnflashlives on a different device and can't be reused.)flash://scan/flash://receivevia the existing React Navigation linking (PREFIX_LINKINGalready includesflash://).Files
ios/FlashWatch Watch App/—FlashWatchApp,ContentView,PriceService,WatchStore,PhoneConnectivityios/FlashWatchComplication/— bundle, provider, accessory viewsios/LNFlash/WatchConnectivityBridge.{swift,m}app/utils/watch.ts,app/components/watch-currency-sync/(mounted inapp/graphql/client.tsx)ios/FlashWatch/SETUP.mdReviewer / merge note
Creating the two watch Xcode targets edits
project.pbxproj, which (per the widget'sios/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.mdhas 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
widget-price-syncpattern;useDisplayCurrency()returns the exactfractionDigits/fiatSymbol/displayCurrencyfields consumed. (Repo-widetsc:checkcurrently errors with a pre-existingTS5095config issue on a cleanmaintoo — unrelated to this change.)SETUP.md(CI here has Command Line Tools only, noxcodebuild).🤖 Generated with Claude Code