Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/watch-connectivity/react-native-watch-connectivity
Enable communication between apple watch app and react native
https://github.com/watch-connectivity/react-native-watch-connectivity
iwatch react react-native watch
Last synced: about 1 month ago
JSON representation
Enable communication between apple watch app and react native
- Host: GitHub
- URL: https://github.com/watch-connectivity/react-native-watch-connectivity
- Owner: watch-connectivity
- License: mit
- Created: 2016-05-01T10:49:19.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-04-30T12:59:10.000Z (8 months ago)
- Last Synced: 2024-11-17T00:40:08.521Z (about 1 month ago)
- Topics: iwatch, react, react-native, watch
- Language: TypeScript
- Homepage: http://mtford.co.uk/react-native-watch-connectivity/
- Size: 18.6 MB
- Stars: 711
- Watchers: 15
- Forks: 92
- Open Issues: 27
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-apple-watch - React Native Watch Connectivity
README
# React Native Watch Connectivity
Communicate with your Apple Watch apps over the React Native bridge.
**Note:** This library does not allow you to write your Apple Watch apps in React Native but rather allows your RN iOS app to communicate with a watch app written in Obj-C/Swift. If you want to build a Wear OS app using react-native refer to [react-native-wear-connectivity](https://github.com/fabOnReact/react-native-wear-connectivity).
## Documentation
http://mtford.co.uk/react-native-watch-connectivity/
## Demo
The featured screenshot is from the [example app](https://github.com/mtford90/react-native-watch-connectivity/tree/master/example). To run the example:
```
git clone https://github.com/mtford90/react-native-watch-connectivity.git
cd react-native-watch-connectivity/example
yarn install
cd ios
pod install
cd ..
yarn ios # Run app
open ios/RNWatchExample.xcworkspace # Run watch app from Xcode
```## Install
```bash
npm install react-native-watch-connectivity --save
# or
yarn add react-native-watch-connectivity
```### Link
Note: this library now supports autolinking for RN 0.60+.
For RN <0.60 link via:
```bash
react-native link
```Or else add the xcodeproj or .h/.m files directly to your project via XCode
#### Manual Linking
Or you can link the library manually by adding `node_modules/react-native-watch-connectivity/ios/RNWatch.xcodeproj` to your project and ensuring that `libRNWatch.a` is present in the **Link Binary With Libraries** build phase.
Alternatively, if you're using CocoaPods, you can add the following to your Podfile:
```
pod 'RNWatch', :path => '../node_modules/react-native-watch-connectivity'
```and run `pod install`.
### Expo Support
This library has been successfully used in Expo apps (Bare Workflow with EAS Build).