6pm is an Expo app with three native extensions: a widget extension (Home and Lock Screen widgets, two Control Center controls, one Live Activity), an App Intents extension ("Log in 6pm" for Siri and Apple Pay automations) and a share extension. The extensions never open the database, and Swift never decides a number: TypeScript writes JSON, Swift lays it out.
Code below is from the 6pm repo . The stack: Expo 58, React Native 0.88 on the New Architecture, and @bacons/apple-targets 5.0.0 for the native targets.
The shape
Everything native beyond the app itself lives in apps/mobile/targets :
targets/ widgets/ WidgetKit: SafeTodayWidget, TodayListWidget, SurfaceActivityWidget, two controls intents/ App Intents extension: LogSpendIntent, open-screen intents share/ Share extension: reads a bank receipt with Vision _shared/ GroupFiles.swift, DomainBridge.swift, ThemeTokens.swift, strings, domain-native.js
Enter fullscreen mode
Exit fullscreen mode
Each target is declared in a few lines of JavaScript.…