Cordova plugin for Sift mobile SDK
This version of the plugin uses version 2.1.0
of the Sift mobile SDK.
You can view Android and iOS SDK sources on Github.
Prerequisites:
- Sift Account ID
- Sift Beacon key
You can install the latest version of the plugin directly from git through the Cordova CLI:
cordova plugin add https://github.com/1andee/cordova-plugin-sift.git
In your 'deviceready' handler, start Sift:
window.cordova.plugins.sift.setAccountId("ACCOUNT_ID");
window.cordova.plugins.sift.setBeaconKey("BEACON_KEY");
To set a user id once they have logged in:
window.cordova.plugins.sift.setUserId("USER_ID");
To unset a user id upon logout:
window.cordova.plugins.sift.unsetUserId();