$ npm install zhike-device-meta-manager --save
$ react-native link zhike-device-meta-manager
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜zhike-device-meta-manager
and addZKDeviceMetaManager.xcodeproj
- In XCode, in the project navigator, select your project. Add
libZKDeviceMetaManager.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)<
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.devicemeta.ZKDeviceMetaManagerPackage;
to the imports at the top of the file - Add
new ZKDeviceMetaManagerPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':zhike-device-meta-manager' project(':zhike-device-meta-manager').projectDir = new File(rootProject.projectDir, '../node_modules/zhike-device-meta-manager/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':zhike-device-meta-manager')
- In Visual Studio add the
ZKDeviceMetaManager.sln
innode_modules/zhike-device-meta-manager/windows/ZKDeviceMetaManager.sln
folder to their solution, reference from their app. - Open up your
MainPage.cs
app
- Add
using Cl.Json.ZKDeviceMetaManager;
to the usings at the top of the file - Add
new ZKDeviceMetaManagerPackage()
to theList<IReactPackage>
returned by thePackages
method
import ZKDeviceMetaManager from 'zhike-device-meta-manager';
// TODO: What do with the module?
ZKDeviceMetaManager;