Skip to content
Christopher Budd edited this page Sep 3, 2019 · 5 revisions
Manual Install

In case you don't like rnpm, here are the steps to manually install this utility.

iOS
  • Right click on the Libraries folder in XCode, and add RNZeroconf.xcodeproj
  • Go to your Build Phases, under Link Binary with Libraries, add libRNZeroconf.a
  • Click on the RNZeroconf.xcodeproj in the Libraries folder, search Header Search Paths and add $(SRCROOT)/../../react-native/React if it's not.
iOS >= 0.60.0
  • Click on the RNZeroconf.xcodeproj in the Libraries folder, search Header Search Paths and add ${SRCROOT}/../../../ios/Pods/Headers/Public/React-Core.
Android
  • Add the following line to the bottom of your project's settings.gradle file.

    project(':react-native-zeroconf').projectDir = new File(settingsDir, '../node_modules/react-native-zeroconf/android')

  • Change the include line of your project's settings.gradle to include the :react-native-zeroconf project.

    include ':react-native-zeroconf', ':app'

  • Open your app's build.gradle file and add the following line to the dependencies block.

    compile project(":react-native-zeroconf")

  • In your app's MainActivity.java file, include this line as part of the ReactInstanceManager.builder() lines.

    .addPackage(new ZeroconfReactPackage())

Android (RN <= 0.44)
  • Add this to the includes in your app's MainActivity.java file:

    import com.balthazargronon.RCTZeroconf.ZeroconfReactPackage;

  • And include this line as part of the getPackages() method:

    new ZeroconfReactPackage()

Hi

Clone this wiki locally