react-native-blip
A module for detecting Blip points and communicating with the Blip API.
Add module
$ yarn add react-native-blip
or
$ npm install react-native-blip --save
Installation
$ react-native link react-native-blip
For manual installation, see below.
Usage
Import native module
const Blip = NativeModules;
Listen for events
blipEmitter = Blip; blipEmitter; blipEmitter; blipEmitter;
Detecting Blip points
Blip; // Start listeningBlip; // Stop listening
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-blip
and addRNBlip.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNBlip.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 io.ifdef.blip.sdk.RNBlipPackage;
to the imports at the top of the file - Add
new RNBlipPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-blip' project(':react-native-blip').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-blip/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-blip')