react-native-plugin2
v0.0.9
Published
This plugin gives you the ability to use the Cloudwise Mobile agent in your react native application.
Downloads
2
Maintainers
Readme
react-native-cloudwise2-react-native-plugin
Getting started
$ npm install react-native-cloudwise2-react-native-plugin --save
Mostly automatic installation
$ react-native link react-native-cloudwise2-react-native-plugin
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-cloudwise2-react-native-plugin
and addRNCloudwise2ReactNativePlugin.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNCloudwise2ReactNativePlugin.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)<
Android
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.cloudwise.RNCloudwise2ReactNativePluginPackage;
to the imports at the top of the file - Add
new RNCloudwise2ReactNativePluginPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-cloudwise2-react-native-plugin' project(':react-native-cloudwise2-react-native-plugin').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-cloudwise2-react-native-plugin/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-cloudwise2-react-native-plugin')
Usage
import RNCloudwise2ReactNativePlugin from 'react-native-cloudwise2-react-native-plugin';
// TODO: What to do with the module?
RNCloudwise2ReactNativePlugin;