How to implement iOS widgets in Expo apps
Article Summary
Arthur Spalanzani built an affirmations app where the widget IS the product, not a companion feature. His widget-first approach achieved 80.7% adoption and unlocked organic social sharing that traditional app screenshots can't match.
This guest post from indie developer Arthur Spalanzani walks through building Glow, an iOS affirmations app that lives primarily on lock screens and home screens. He shares how he bridged React Native and Swift widgets using Expo's experimental @bacons/apple-targets plugin, maintaining fast iteration while writing native code.
Key Takeaways
- Widgets are separate Swift targets that share data via App Groups
- Timeline-based updates generate 24 hours of content, one entry per hour
- Deep linking connects widget taps to specific app content seamlessly
- No hot reload for Swift: every change needs prebuild and Xcode
- 80.7% of users install at least one widget, lock screen most popular
React Native developers can build native iOS widgets without leaving Expo's workflow using config plugins that generate Swift targets outside the /ios directory.
About This Article
Arthur Spalanzani wanted to build native Swift widgets while keeping Expo's fast iteration workflow. The challenge was that widgets require native code and can't run JavaScript.
He turned to @bacons/apple-targets, an experimental Expo Config Plugin that generates native Apple targets like widgets in a separate /targets directory. This kept them manageable outside the main /ios folder and preserved EAS Build integration.
Widgets became how users primarily interacted with the app. Lock screen widgets were especially popular, and users started sharing customized home screen screenshots on social media. This organic sharing gave the app a marketing edge that traditional app screenshots couldn't match.