KjellConnelly / react-native-rate

Send your app users to Apple App Store, Google Play, Amazon, or other using the newest APIs
635 stars 100 forks source link

Redirecting to Appstore #88

Closed jonathanroze closed 2 years ago

jonathanroze commented 2 years ago

Hi,

I'm using your library to implement in app rating to my app, and it's works quite well.

But on iPhone I've a weird issue.

when I'm under development, no issue, the popup show up but on production, I'm directly redirected to App Store application. Not very pleasant in term of UX.

Do you have any idea ?

(Everything works great on Android)

"react-native-rate": "^1.2.6",

    const options = {
        AppleAppID: '1566....',
        GooglePackageName: 'com.app',
        AmazonPackageName: 'com.app',
        preferredAndroidMarket: AndroidMarket.Google,
        preferInApp: true,
        openAppStoreIfInAppFails: true,
        fallbackPlatformURL: 'https://webiste.app',
      };

Thanks

KjellConnelly commented 2 years ago

It looks like the official api had a method that this module uses that was deprecated in iOS 14.0. I'll have to update the method called.

It was only recently (iOS 14.5 or so) that the deprecated method started doing nothing. Thanks for letting me know :) I'll try to look into it later and come up with a fix.

Have to use requestReviewInScene instead of requestReview.

https://developer.apple.com/documentation/storekit/skstorereviewcontroller/3566727-requestreviewinscene?language=objc

jonathanroze commented 2 years ago

Hey Kjell,

Ok perfect ! Thanks you for your rapidity!

KjellConnelly commented 2 years ago

Alright I added some code. I didn't check that it works in a react native app... but I did check that the new code works on a fresh iOS xcode project. Let me know if there are any issues.