react-native-sift-sdk

1.0.8 • Public • Published

react-native-sift-sdk

Getting started

$ npm install react-native-sift-sdk --save

Mostly automatic installation

$ react-native link react-native-sift-sdk

Manual installation

iOS

  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modulesreact-native-sift-sdk and add RNSiftSdk.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRNSiftSdk.a to your project's Build PhasesLink Binary With Libraries
  4. Run your project (Cmd+R)<

Android

  1. Open up android/app/src/main/java/[...]/MainApplication.java
  • Add import com.reactlibrary.RNSiftSdkPackage; to the imports at the top of the file
  • Add new RNSiftSdkPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-sift-sdk'
    project(':react-native-sift-sdk').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-sift-sdk/android')
    
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':react-native-sift-sdk')
    

Usage

import Sift from 'react-native-sift-sdk';

Sift.initSdk(accountid, beaconkey); //init sdk

Sift.setUserId(id); // set user id

Sift.unsetUserId(); // unset user id on logout

Readme

Keywords

Package Sidebar

Install

npm i react-native-sift-sdk

Weekly Downloads

1

Version

1.0.8

License

Apache-2.0

Unpacked Size

147 kB

Total Files

54

Last publish

Collaborators

  • amit.assaraf