Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to SKStoreReviewController for In-App Reviews in iOS #166

Merged
merged 5 commits into from Jul 17, 2017

Conversation

jesusbotella
Copy link
Contributor

Hello everyone!

I have added support to the new in-app rating system that Apple released for iOS 10.3 or above. I thought that it would be useful to make a PR, making it available in the plugin.

This new app reviewing feature is only available in iOS 10.3 or above. There is only one limitation, you only can ask for review three times a year.

Here you have the SKStoreReviewController API Reference and the iOS Human Interface Guidelines about Ratings and Reviews.

All feedback is welcomed, and I hope you like this PR.

@westonganger
Copy link
Collaborator

It looks like you replaced the original functionality with the new one so it wouldn't work on devices older than iOS 10.3. It should gracefully fallback to the open app store way if the device is older than iOS 10.3 and maybe it should also gracefully fallback when the 3 reviews limitation has been exceeded.

@jesusbotella
Copy link
Contributor Author

jesusbotella commented Jun 23, 2017

No, I didn't. If you look at this method, I check if the new review method is available, and if it is not, it has a fallback for older devices with the code that was executed before.

I didn't add a check for the three reviews yet, but it might be a good improvement.

@filipsuk
Copy link

It would be great to have this feature! I found two other plugins using it, however it would be nice to have it available in this all-in-one plugin.

@westonganger
Copy link
Collaborator

@jesusbotella would love it if you could add the graceful fallback for once the 3 reviews limitation. Once thats done we can merge this PR.

@jesusbotella
Copy link
Contributor Author

jesusbotella commented Jun 30, 2017

@westonganger Let's see if I can implement it this weekend, and update the PR ;)

@jesusbotella
Copy link
Contributor Author

Hello again!

I have just uploaded the new feature to limit native rating prompt to three occurrences within a 365-day period. Give it a look, and if there is anything to change, please tell me and I'll fix it :)

@westonganger westonganger merged commit 7bb820d into pushandplay:master Jul 17, 2017
@westonganger
Copy link
Collaborator

Looks great! Thanks for your hard work!

@jesusbotella
Copy link
Contributor Author

@westonganger That was fast! Thank you so much!

@jesusbotella
Copy link
Contributor Author

@westonganger Can you please give a bump to the version number, and publish it to npm?
I forgot to change it :(

@westonganger
Copy link
Collaborator

Please note that after merging this I have since changed the preference option openStoreInApp which defaults to false ----> inAppReview which defaults to true

As for the new version, I would like to let the changes sit and get tested for a little bit. Please use master for the time being.

@jesusbotella
Copy link
Contributor Author

OK, no problem :)

I have tested it on my device but it is much better to be tested by more users of the plugin :)

@filipsuk
Copy link

It works for me. Just had to add some keys to my custom locale for some reason. I was getting errors from Locales.getLocale method on lines 56-62. I'm using the simple mode, so I don't need all the localizations. I just set them to empty strings and it works ok now.

@westonganger
Copy link
Collaborator

Can you tell me which keys you needed to add blanks on?

@filipsuk
Copy link

@westonganger I added these:

  • appRatePromptTitle
  • feedbackPromptTitle
  • appRatePromptMessage
  • feedbackPromptMessage

@westonganger
Copy link
Collaborator

Thanks. The latest master should now have this fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants