Revolutionize iOS Widgets: Live Golf Scores with React NativeRevolutionize iOS Widgets: Live Golf Scores with React Native
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started
Just shipped iOS Home Screen & Lock Screen widgets in React Native. šŸš€ Most people say it can't be done cleanly. Here's proof it can šŸ‘† The widget updates live golf scores directly on your Home Screen — no app open, no refresh needed. Here's what made this tricky: Widgets are completely sandboxed. No JS bridge. No fetch(). No React state. The only way to pass data from React Native to the widget is through App Groups + UserDefaults — and if your provisioning profile doesn't match exactly, the widget shows blank. No error. No warning. Just silence. What you're seeing in the code: → PlayerScore model shared between app and widget extension → TimelineProvider controlling exactly when the widget refreshes → loadGameData() reading live data from UserDefaults with the App Group suite name → Full SwiftUI rendering — inside a React Native project 3 things that will burn you if you try this: App Group ID must be identical in both targets — one character off = silent failure .never refresh policy means YOU control updates, not WidgetKit Always test on a real device — simulator caches stale widget data constantly
Post image
Post image
Back to feed
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started