$ npm install react-native-indicative --save
$ react-native link react-native-indicative
Libraries
➜ Add Files to [your project's name]
node_modules
➜ react-native-indicative
and add RNIndicative.xcodeproj
libRNIndicative.a
to your project's Build Phases
➜ Link Binary With Libraries
Cmd+R
)<android/app/src/main/java/[...]/MainActivity.java
import com.reactlibrary.RNIndicativePackage;
to the imports at the top of the filenew RNIndicativePackage()
to the list returned by the getPackages()
methodandroid/settings.gradle
:
include ':react-native-indicative'
project(':react-native-indicative').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-indicative/android')
android/app/build.gradle
:
compile project(':react-native-indicative')
import Indicative from 'react-native-indicative';
Indicative.launch("YOUR-INDICATIVE-API-KEY");
Indicative.record("App Open");
Indicative.identifyUser("xyz5");
Indicative.addCommonProperties({"property2": 1, "property2": "test"});
Indicative.addCommonProperty("property3", "test2");
Indicative.addCommonProperty("property4", "test4");
Indicative.removeCommonProperty("property3");
Indicative.clearCommonProperties();
Indicative.addCommonProperty("property5", "test5");
Indicative.recordWithProperties("App Open 2", {"app open property": 555});
Indicative.recordWithUniqueKey("App Open 3", "unique key");
Indicative.recordWithPropertiesUniqueKey("App Open 4", "unique key", {"app open property2": 555});