From 4684f5cf8a29eff5b5b183e352806b12be5bb0d1 Mon Sep 17 00:00:00 2001 From: Alexey Pyltsyn Date: Sat, 30 Sep 2017 19:47:14 +0300 Subject: [PATCH] Improve README --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 87fcc96..ff49ceb 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ React Native bridge to the [AppMetrica](https://appmetrica.yandex.com/) on both ## Installation -1. [Setup AppMetrica](https://tech.yandex.com/appmetrica/). +1. **Only for iOS**: [setup AppMetrica](https://tech.yandex.com/appmetrica/). `YandexMobileMetrica.framework` should be placed at `/ios/` or `/ios/Frameworks/`. Otherwise you'll get build error. 2. `npm install --save react-native-appmetrica` @@ -17,17 +17,18 @@ Otherwise you'll get build error. make sure `YandexMobileMetrica.framework` and `libRCTAppMetrica.a` are included at Build Phase -> Link Binary With Libraries ## Example -``` + +```js import AppMetrica from 'react-native-appmetrica'; AppMetrica.activateWithApiKey('2dee16d2-1143-4cd3-a904-39ce10ac2755'); -AppMetrica.reportEvent('Hello world') +AppMetrica.reportEvent('Hello world'); ``` ## Usage -``` +```js import AppMetrica from 'react-native-appmetrica'; // Starts the statistics collection process. @@ -37,6 +38,6 @@ AppMetrica.activateWithApiKey('...KEY...'); AppMetrica.reportEvent('My event'); AppMetrica.reportEvent('My event', { foo: 'bar' }); -// Send a custom error event +// Send a custom error event. AppMetrica.reportError('My error'); ```