Asking for reviews or ratings is a pretty important part of gaining traction with an app. Last year Apple announced that they wouldn’t be approving apps or updates that used their own dialogues to ask for reviews anymore. Instead they offered up a new API – SKStore​Review​Controller – which shows a standardized review dialogue to users. I wrote a little bit about implementation with Swift/Objective-C in another article last year. Today I wanted to focus more on adding this functionality to a React Native app.

Asking for Reviews with SKStore​Review​Controller

As far as I know React Native still doesn’t support this functionality by default. When I decided to add the dialogue into one of my apps I had to find a good library, which was actually pretty easy. I ended up going with react-native-app-store-review. Installation is pretty straight-forward, first you install the package with npm:

Then you need to link it(it’s a wrapper for the native iOS library):

Usage is really simple too, all you need to do is import library and then write one line:

You would replace ‘[APP ID]’ with your app’s iTunesConnect ID. Apparently if the user has a version of iOS lower than 10.3 it will automatically take them to the App Store(so they can write a review) using the ID. I’m not too sure how I feel about that from a user-standpoint but iOS fragmentation seems to be pretty low so it’s probably not too much of a concern.

The Result

After calling the method you will get presented with a dialogue like this:

Asking for Reviews with React Native and SKStore​Review​Controller

An example of the review dialogue

When you’re running your app on a simulator you will see the dialogue every time you call requestReview, but on release builds on real devices Apple advises that the user will only see the dialogue a maximum of 3 to 4 times a year.

Final Word

I’m kind of glad there is a specific way to do this on iOS. Android doesn’t have anything similar yet, but there are some native libraries that will help with launch counting, ‘remind me’ buttons etc. Nothing seems to really be available for Android on React Native so far so you pretty much either have to make a wrapper for a native library or roll your own logic. Hopefully this will change sometime in the near future. Last week I wrote an article about using SafeAreaView in React Native, if you’re interested you can find it here.