From 66a5ee0c4d4f9f8bb8ab169e4f6486264d98d44c Mon Sep 17 00:00:00 2001 From: Aleksei Androsov Date: Sat, 30 Sep 2017 15:41:17 +0300 Subject: [PATCH] Update README --- README.md | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index afcb033..02fb8a0 100644 --- a/README.md +++ b/README.md @@ -14,4 +14,28 @@ React Native bridge to the AppMetrica on both iOS and Android. 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...'); + +// Sends a custom event message and additional parameters (optional). +AppMetrica.reportEvent('My event'); +AppMetrica.reportEvent('My event', { foo: 'bar' }); +```