1 | # react-native-store-review
|
2 |
|
3 | This module exposes the native iOS APIs to ask the user to rate the app in the iOS App Store.
|
4 |
|
5 | <img width="274" alt="Rating Dialog" src="https://cloud.githubusercontent.com/assets/378279/24377493/d22eb0b8-133f-11e7-9968-44d186a3801f.png">
|
6 |
|
7 | ## Installation
|
8 |
|
9 | `$ yarn add react-native-store-review`
|
10 |
|
11 | ### Mostly automatic installation
|
12 |
|
13 | `$ react-native link react-native-store-review`
|
14 |
|
15 | ### Manual installation
|
16 |
|
17 | 1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`
|
18 | 2. Go to `node_modules` ➜ `react-native-store-review` and add `RNStoreReview.xcodeproj`
|
19 | 3. In XCode, in the project navigator, select your project. Add `libRNStoreReview.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`
|
20 | 4. Run your project (`Cmd+R`)
|
21 |
|
22 | ### Using [CocoaPods](https://cocoapods.org/)
|
23 |
|
24 | Add the following to your `Podfile` and run `pod install`:
|
25 |
|
26 | ```
|
27 | pod 'RNStoreReview', :path => 'node_modules/react-native-store-review/ios'
|
28 | ```
|
29 |
|
30 | ## Usage
|
31 | ```javascript
|
32 | import * as StoreReview from 'react-native-store-review';
|
33 |
|
34 | if (StoreReview.isAvailable) {
|
35 | StoreReview.requestReview();
|
36 | }
|
37 | ```
|