react-native-smartconfig-p
Getting started
$ npm install react-native-smart-config-p --save
or
$ yarn add react-native-smart-config-p --save
Mostly automatic installation
## * React Native 0.60+
CLI autolink featurelinks the module while building the app.
For iOS using
cocoapods**
, run:$ cd ios/ && pod install`
## * React Native <= 0.59
$ react-native link react-native-smartconfig-p
Manual installation
iOS
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜react-native-smartconfig-p
and addRnSmartConfigP.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRnSmartConfigP.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)<
Android
- Open up
android/app/src/main/java/[...]/MainApplication.java
- Add `import com.phuong.smartconfigp.RnSmartConfigPPackage;` to the imports at the top of the file
- Add `new RnSmartConfigPPackage()` to the list returned by the `getPackages()` method
- Append the following lines to
android/settings.gradle
:include ':react-native-smartconfig-p' project(':react-native-smartconfig-p').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-smartconfig-p/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:implementation project(':react-native-smartconfig-p')
Usage
; SmartConfigPstart ssid: "WiFi Name" password: "Password" bssid: "MAC" // Mac address of Mobile count: 1 //Number Esp cast: 'broadcast' // boardcast or multicast ; // if want cancle, use: SmartConfigP;