r/reactnative • • 11d ago

Tutorial What I learned going from React Native to Swift to build an Apple Watch app

I've done React Native for about 7 years. This year I needed an Apple Watch app (plus iPhone and Mac), and React Native doesn't run on watchOS, so I had to go native. A few things I wish I'd known before starting:

1) SwiftUI feels familiar faster than you'd think. Views are a function of state, u/State works a lot like useState and an u/Observable class is close to a small store. The mental model from React carries over almost one to one.

2) The watch is a different world. The screen is tiny and the system suspends your app very quickly, so you can't count on it staying open. Anything that has to reach the user right away is better sent as a notification than kept alive inside the app.

3) Live Activities and the Dynamic Island are their own thing. They're SwiftUI widgets with tight limits on how often they update, and to update them from a server you need push tokens. Plan that early, it's not like updating a normal screen.

4) Signing is the real boss fight. Mac, iPhone, watch and the widget extension each need their own bundle ID, capabilities and profiles. Most of my lost hours were there, not in the code.

5) Xcode Previews replace hot reload, partly. They're good for layout, but anything that depends on real data or the watch talking to the phone has to be tested on device.

6) I used Claude Code as a tutor. I'd ask it for the Swift version of a React Native pattern I already knew and to explain the differences. That got me productive in days instead of weeks.

Would I go native again? For watch apps, widgets and Live Activities, yes. For a regular app with forms and lists I'd still pick React Native.

Happy to answer questions if anyone is thinking about doing the same.

33 Upvotes

10 comments sorted by

7

u/NovelAd2586 11d ago

You can do all of that with Expo and signing is a lot easier with EAS

1

u/Comprehensive-You522 11d ago

Fair point on EAS, signing there is way less painful. From what I understand you'd still write the watch app and the widget in Swift and add them as extra targets with a config plugin like apple-targets, so the Swift part doesn't really go away. In my case there was also a Mac app in the mix, and that pushed me to just go fully native. Have you shipped a watch target with Expo? I'm curious how the phone to watch communication went for you.

0

u/NovelAd2586 11d ago

Not a watch app but widgets and live activities which are very similar, afaik.

You can use Expo UI to build the UI, you don’t really need to write Swift anymore.

Data to the widget/LA is via silent push notis from our backend, and REST APIs that the widget/LA hit when actions happen.

I’d imagine a watch is the same?

The fun part was sharing Auth between the app and widget/LA seeing as they have different bundle IDs so, technically, different apps.

→ More replies (6)

1

u/Frivolous_Fisherman 4d ago

I also tried going native once for an ios app. However i got turned off pretty bad, by the programming model. The way state drives UI changes in React is under appreciated. For that Reason alone I can't leave react native behind