More Premium Hugo Themes Premium React Themes

React Native Watch Connectivity

Enable communication between apple watch app and react native

React Native Watch Connectivity

Enable communication between apple watch app and react native

Github Stars Github Stars: 739
Last Commit Last Commit: Mar 11, 2024 -
First Commit Created: Feb 24, 2024 -
default image

Overview

React Native Watch Connectivity is a library that allows React Native iOS apps to communicate with Apple Watch apps. It acts as a bridge between the two platforms, enabling seamless connectivity without the need for rewriting the watch app in React Native. This library enhances the functionality of React Native apps by facilitating communication with watch apps written in Objective-C/Swift.

Features

  • Bridge Communication: Facilitates communication between React Native iOS apps and Apple Watch apps.
  • Autolinking Support: Supports autolinking for React Native 0.60+ versions.
  • Manual Linking: Provides instructions for manually linking the library for versions below RN 0.60.
  • Expo Support: Successfully used in Expo apps with Bare Workflow and EAS Build.

Installation

To install React Native Watch Connectivity, follow these steps:

  1. For RN 0.60+, use autolinking:
npm install react-native-watch-connectivity
  1. For RN <0.60, link it via:
react-native link react-native-watch-connectivity
  1. Alternatively, manually link the library by adding RNWatch.xcodeproj to your project and ensuring libRNWatch.a is in the Link Binary With Libraries build phase. For CocoaPods, add the following to your Podfile:
pod 'react-native-watch-connectivity', :path => '../node_modules/react-native-watch-connectivity'

Then run pod install.

Summary

React Native Watch Connectivity provides a seamless bridge for communication between React Native iOS apps and Apple Watch apps. With features such as autolinking support, manual linking guidelines, and compatibility with Expo apps, this library enhances the connectivity options for developers working with these platforms.