Aleksei Androsov a8a29e646c
Merge pull request #15 from hssrrw/use-pods
Allow Cocoapods
2018-09-10 16:08:20 +03:00
2018-08-30 11:13:18 +02:00
2017-09-30 17:54:19 +03:00
2017-09-18 10:07:46 +03:00
2017-09-30 15:41:58 +03:00
2017-09-30 15:41:58 +03:00
2017-09-18 10:03:45 +03:00
2017-09-30 14:29:12 +03:00
2017-09-18 10:10:51 +03:00
2018-08-30 11:13:18 +02:00
2017-09-18 09:46:10 +03:00
2018-08-06 16:50:41 +03:00
2018-08-06 16:43:49 +03:00
2018-08-30 11:13:18 +02:00

Build Status NPM version

react-native-appmetrica

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

Installation

  1. Only for iOS: setup AppMetrica. YandexMobileMetrica.framework should be placed at <project_dir>/ios/ or <project_dir>/ios/Frameworks/. Otherwise you'll get build error.
  2. npm install --save react-native-appmetrica
  3. react-native link react-native-appmetrica

iOS notice: If you build failed after installing SDK and react-native-appmetrica make sure YandexMobileMetrica.framework and libRCTAppMetrica.a are included at Build Phase -> Link Binary With Libraries

Example

import AppMetrica from 'react-native-appmetrica';

AppMetrica.activateWithApiKey('2dee16d2-1143-4cd3-a904-39ce10ac2755');

AppMetrica.reportEvent('Hello world');

Usage

import AppMetrica from 'react-native-appmetrica';

// Starts the statistics collection process.
AppMetrica.activateWithApiKey('...KEY...');
// OR
AppMetrica.activateWithConfig({
  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');
Description
No description provided
Readme 14 MiB
Languages
Java 35.1%
Objective-C 34.1%
JavaScript 19.6%
Ruby 9.6%
Starlark 1.6%