RN IOS APP & WatchOS Companion

I already have a working iOS React Native app and I’m planning to add a watchOS companion app.

Is it possible to keep the iOS app and the watchOS app in separate repositories? If so, will WatchConnectivity still work properly between them?

Or is it recommended to keep both in a single Xcode project/repository?

Answered by DTS Engineer in 885376022

If you are building an iOS app with a companion watchOS app, the watchOS app bundle has to be embedded in a certain location in the iOS app bundle. Xcode takes care all that if you manage the apps as two targets in one single project.

Putting the apps to separate repositories can't achieve that, unless you'd have a post build script to do all the trick, which will add unnecessary complexity to your build process.

So yes, I'd strongly recommend that you keep your iOS app and its companion watchOS app in one single Xcode project.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

If you are building an iOS app with a companion watchOS app, the watchOS app bundle has to be embedded in a certain location in the iOS app bundle. Xcode takes care all that if you manage the apps as two targets in one single project.

Putting the apps to separate repositories can't achieve that, unless you'd have a post build script to do all the trick, which will add unnecessary complexity to your build process.

So yes, I'd strongly recommend that you keep your iOS app and its companion watchOS app in one single Xcode project.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

RN IOS APP & WatchOS Companion
 
 
Q