Go to file
2021-01-21 16:10:35 +10:00
android add reportUserProfile 2021-01-21 16:10:35 +10:00
example init 2021-01-21 14:29:24 +10:00
ios release 2.0.0 2020-06-08 22:14:06 +03:00
.gitignore release 2.0.0 2020-06-08 22:14:06 +03:00
.npmignore release 2.0.0 2020-06-08 22:14:06 +03:00
AUTHORS add reportUserProfile 2021-01-21 16:10:35 +10:00
index.js add reportUserProfile 2021-01-21 16:10:35 +10:00
LICENSE release 2.0.0 2020-06-08 22:14:06 +03:00
package.json add reportUserProfile 2021-01-21 16:10:35 +10:00
react-native-appmetrica-next.podspec add reportUserProfile 2021-01-21 16:10:35 +10:00
README.md init 2021-01-21 14:29:24 +10:00

react-native-appmetrica-next

React Native bridge to the AppMetrica on both iOS and Android. react-native-push-next library functionality is expanded react-native-appmetrica

Installation

npm install react-native-appmetrica-next --save or yearn add react-native-appmetrica-next

  1. If React Native version <= 0.59:
    react-native link react-native-appmetrica-next
  2. iOS only
  • if ${PROJECT_DIR}/ios/Podfile exists:
    npx pod-install
  • if ${PROJECT_DIR}/ios/Podfile don't exists:
    Setup AppMetrica and placed frameworks at ${PROJECT_DIR}/ios/Frameworks

Usage

import AppMetrica from "react-native-appmetrica-next";

// Starts the statistics collection process.
AppMetrica.activate({
  apiKey: "...KEY...",
  sessionTimeout: 120,
  firstActivationAsUpdate: true,
});

// Sends a custom event message and additional parameters (optional).
AppMetrica.reportEvent("My event");
AppMetrica.reportEvent("My event", { foo: "bar" });

// Send a custom error event.
AppMetrica.reportError("My error");