
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
react-native-sift-iosshare
Advanced tools
React Native wrapper for Sift iOS and Android SDKs
yarn add sift-react-nativenpm install sift-react-nativeNo additional setup is required
pod 'sift-react-native', :path => '../node_modules/sift-react-native'pod installreact-native link
Append the following lines to android/settings.gradle:
include ':sift-react-native'
project(':sift-react-native').projectDir = new File(rootProject.projectDir, '../node_modules/sift-react-native/android')
Insert the following lines inside the dependencies block in android/app/build.gradle:
implementation project(':sift-react-native')
Open up android/app/src/main/java/[...]/MainApplication.java
import com.siftreactnative.SiftReactNativePackage; to the imports at the top of the filenew SiftReactNativePackage() to the list returned by the getPackages() method. Add a comma to the previous item if there's already something there.Insert the following lines inside the dependencies block in
android/app/build.gradle:
implementation 'com.android.support:support-v4:27.0.2'
Support will be available soon
First, import the module:
import SiftReactNative from "sift-react-native";
Then, invoke the following method to initialise the SDK:
SiftReactNative.setSiftConfig(accountId, beaconKey, disallowCollectingLocationData, serverUrlFormat);
Where:
Make sure to add location permissions to your application if you want Sift to collect location data. Sift will not request permissions that are not granted by the user from your application.
https://api3.siftscience.com/v3/accounts/%@/mobile_events
-- Sample URL format for Android: https://api3.siftscience.com/v3/accounts/%s/mobile_eventsNB: This feature is available only in iOS platform
As soon as your application is aware of the user id, set it on the Sift instance using the code below. All subsequent events will include the user id.
SiftReactNative.setUserId(userId);
If the user logs out of your application, you should unset the user id:
SiftReactNative.unsetUserId();
To upload collected events to sift.
SiftReactNative.upload();
NB: This feature is available only in Android platform
To set the page name
SiftReactNative.setPageName("HomePage");
To see sift-react-native in action you can check out the source in the example folder.
yarn bootstrap
When the bootstrap is done, you will be able to start the example app by executing one of the following commands:
yarn example ios
yarn example android
MIT
FAQs
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.