react-native-watch-connectivity with expo

How do you communicate with WatchKit Apps from you expo apps? I found this library: react-native-watch-connectivity, for communicating between a React Native application and a separate WatchKit application built with swift. Is this something this Expo supports? or will support?

AFAIK this is somewhat supported by Expo, but only in their Bare Workflow. To create an Apple Watch project, you need to have an Xcode project, which you do not, as long as you are in the Managed Workflow.

So you need to “eject” your project, which will create ios and android folders. In the ios folder, you can find and open the Xcode workspace, and add an Apple Watch project to it.

The react-native-watch-connectivity is then added to the RN (Expo) project to communicate with the Apple Watch app.

react-native-watch-connectivity includes native code which is not included in the Expo Go app, so it cannot work with Expo Go. However according to the installation instructions it does not need anything special. Just autolinking. So it should work out of the box with a development build.

See also: Integrate the react-native-watch-connectivity library, directly with expo - #3 by wodin

If you want to generate the native projects you should use npx expo prebuild. This will use any config plugins you have specified in app.json to set things up as needed.

expo eject is no longer a thing.

However, as mentioned above, you should not need to prebuild to use react-native-watch-connectivity.