Skip to content

React Native bridge to the AppMetrica on both iOS and Android.

License

Notifications You must be signed in to change notification settings

DenSakhon/react-native-appmetrica

 
 

Repository files navigation

forked-react-native-appmetrica

React Native bridge to the AppMetrica on both iOS and Android.

Installation

  1. npm install forked-react-native-appmetrica --save
  2. If React Native version <= 0.59:
    react-native link forked-react-native-appmetrica
  3. 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 'forked-react-native-appmetrica';

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

// 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');

About

React Native bridge to the AppMetrica on both iOS and Android.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 38.3%
  • Objective-C 35.9%
  • JavaScript 17.6%
  • Ruby 7.0%
  • Starlark 1.2%