https://github.com/numandev1/react-native-sift
https://github.com/numandev1/react-native-sift
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/numandev1/react-native-sift
- Owner: numandev1
- Created: 2019-08-21T06:22:36.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T07:42:23.000Z (over 3 years ago)
- Last Synced: 2025-03-31T19:40:24.187Z (over 1 year ago)
- Language: Java
- Size: 2.58 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# React-Native-sift
---
# Docs
---
Follow our docs here https://sift.com/developers/docs
# Installation:
by yarn
```
yarn add react-native-sift
```
by npm
```
yarn add react-native-sift
```
# Android
1- Also add the project to your settings.gradle:
```
include ':react-native-sift'
project(':react-native-sift').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-sift/android')
```
2- add dependency in app/build.gradle
```
implementation project(':react-native-sift')
```
3- add these lines in android/app/src/[...]/MainApplication.java
```
import com.reactnativesift.siftmodule.SiftModulePackage;
//...
@Override
protected List getPackages() {
return Arrays.asList(
new MainReactPackage(),
new SiftModulePackage(), // <-- add this
}
```
# IOS
Using the same instructions as https://facebook.github.io/react-native/docs/linking-libraries-ios.html
1- open in xcode open ios/yourProject.xcodeproj/
2- drag ./node_modules/react-native-sift/ios/reactNativeSift.xcodeproj to Libraries in you project view.
3- In the XCode project navigator, select your project, select the Build Phases tab drag Libraries > reactNativeSift.xcodeproj > Products > reactNativeSift.a into the Link Binary With Libraries section.
# Usage
```
import Sift from 'react-native-sift';
Sift.initSdk(accountid, beaconkey); //init sdk
Sift.setUserId(id); // set user id
```