-
Notifications
You must be signed in to change notification settings - Fork 102
Installation
yarn add react-native-zeroconf
# or
npm install react-native-zeroconf1.0 release candidate: one C++ native module on every platform, for React Native 0.82 and later (New Architecture, Expo SDK 55 and later). Try it with
npm install react-native-zeroconf@next, see what changes from 0.17. These docs cover 0.17, which stays the default and keeps getting bug fixes.
The library contains native code and is autolinked by React Native (0.60 and later), there is nothing to link by hand. Rebuild the app after installing it: a JavaScript reload is not enough after adding a native module.
| Platform | Page |
|---|---|
| iOS, macOS, tvOS | iOS |
| Android | Android |
| Windows (react-native-windows) | Windows |
| Expo (development builds) | Expo |
| Platform | Minimum |
|---|---|
| React Native | 0.60 (peer dependency >=0.60) |
| iOS | 13.4 or React Native's minimum |
| macOS | 10.15 |
| tvOS | 13.4 |
| Android | API 21 (Android 5.0) |
| Windows | Windows 10, react-native-windows 0.84 tested |
See Platform Support for feature differences.
Types are bundled (index.d.ts). Remove @types/react-native-zeroconf if you installed it, since it conflicts with the bundled types.
import Zeroconf, { ImplType, Service, ZeroconfError } from 'react-native-zeroconf'Configure Permissions and Setup: on iOS 14+ discovery fails until NSBonjourServices lists your service types.
Documentation for react-native-zeroconf 0.17. Found a mistake? Open an issue. | Home | API Reference | Troubleshooting