Giter VIP home page Giter VIP logo

react-native-rating-requestor's People

Contributors

alexanderwallin avatar andreleon avatar dependabot[bot] avatar imranariffin avatar jasonlfunk avatar jlyman avatar randombrainstormer avatar rodrigopk avatar sercanov avatar skv-headless avatar taylora123 avatar ttargo1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

react-native-rating-requestor's Issues

Link for Appstore no longer working on iOS 11

The url used on the showRatingDialog is outdated and no longer works on iOS 11.

showRatingDialog(callback = () => {}) {
		let storeUrl = Platform.OS === 'ios' ?
			'http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=' + _config.appStoreId + '&pageNumber=0&sortOrdering=2&type=Purple+Software&mt=8' :
			'market://details?id=' + _config.appStoreId;
.
.
.

Following this discussion on stack overflow, we should update the iOS url to follow the following format:
https://itunes.apple.com/us/app/appName/idAPP_ID?mt=8&action=write-review.
So far as I could test it, this format works on both iOS 11 and 10.
If it's ok, I'm creating a PR with this change

iOS vs Android button ordering

The code uses button ordering for Android ie. [bottom, middle, top]. On iOS the button ordering for alert is [top, middle, bottom] so the accept button is at the bottom which doesn't make much sense from a UX point of view. You want the desirable button to be at the top and the least desirable at the bottom.

There should be a platform check to reverse the order of buttons based on iOS vs Android.

Will not work in IOS due to peerDependency change

There is a peerDependency for https://github.com/oblador/react-native-store-review set to

"react-native-store-review": "^0.1.5"

But in the latest version, that library has deprecated an all important method used by the current version of this library, called StoreReview.isAvailable

if (Platform.OS === 'ios' && StoreReview.isAvailable) {
   StoreReview.requestReview();
}

In 0.3.0 they removed the method:

BREAKING CHANGE: Drop support for Android <21 & iOS < 12.4, and remove isAvailable constant.

So StoreReview.isAvailable will return undefined, and that "if" statement will never succeed. Therefore, this never gets called:

StoreReview.requestReview();

For me, the fix was to do a patch and remove the call to isAvailable:

diff --git a/node_modules/react-native-rating-requestor/index.js b/node_modules/react-native-rating-requestor/index.js
index 7f87cc3..3dfded5 100644
--- a/node_modules/react-native-rating-requestor/index.js
+++ b/node_modules/react-native-rating-requestor/index.js
@@ -121,7 +121,7 @@ export default class RatingRequestor {
           RatingsData.recordRated();
           callback(true, "accept");
           // This API is only available on iOS 10.3 or later
-					if (Platform.OS === 'ios' && StoreReview.isAvailable) {
+					if (Platform.OS === 'ios') {
 						StoreReview.requestReview();
 					} else {
 						Linking.openURL(this.storeUrl);

Swap to using SKStore​Review​Controller on iOS

Apple is mandating all apps to drop custom rating dialogs in iOS 11 and use SKStore​Review​Controller, so we'll need to switch to using that on iOS. This would be a net positive anyway (though slightly less flexible than what's already in place).

does not work? [ios]

Hi,

I'm trying this component on ios and it does not seem to work.

When I click on "Sure!" In the popup, Safari opens but gives me an error:

image

is not the repo updated?

Thanks

Android

Nice, would be great to see Android support!

RatingRequestor is not a constructor

Hi,
I'm getting an error when I try to initialize RatingRequestor. I'm putting the following code in my index.ios.js

import RatingRequestor from 'react-native-rating-requestor'
let RatingTracker = new RatingRequestor('[my app id]')

And I get the following error when trying to run my app:
RatingRequestor is not a constructor

Any help is greatly appreciated. Thanks!

In-app reviews for iOS

I cannot tell whether this plugin supports iOS 10.3+ feature of in-app reviews. If not, can we have this support?

timingFunction is not working?

Hello,

I try to call timingFunction, but it's not working. Please see code below.

import RatingRequestor from "react-native-rating-requestor";

const RatingTracker = new RatingRequestor(
Platform.select({
ios: 'xxxxxxxxx',
android: 'app.xxx',
}), {
shouldBoldLastButton: true,
timingFunction: function(currentCount) {
return currentCount > 1 && Math.log(currentCount) / Math.log(3) % 1 == 0;
}
});

Is it possible to use a custom prompt/dialog?

This looks like a great module. I would like to keep the style of my app and want to use my own prompt/dialog. Is there a way to know when it's time to show my own dialog and methods I can call depending on which button the user presses?

How to config it for iOS and android at the same time?

Hi!

I see that this lib supports iOS and android but fail to see how to use both in the docs. I just want to confirm that the lib expects me to have some sort of platform specific code for iOS and android and call the lib separately (?). It's what I'd understand atm.

Also, since I assume that by default the lib will redirect to the app store / g play sites, is there any way to take the user immediately to the rating section instead of just the product page?

Thanks again for working on this :-)
Joan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.