MinaSamir11 / react-native-in-app-review

The Google Play In-App Review API, App store rating API lets you prompt users to submit Play Store or App store ratings and reviews without the inconvenience of leaving your app or game.
MIT License
646 stars 56 forks source link

Review prompt not displayed in production on iOS #127

Open 11OClock opened 1 year ago

11OClock commented 1 year ago

Hi, thank you for the great library. On android, everything works flawlessly, and we noticed an important increase in reviews thanks to this library. But we are currently experiencing a problem in production on iOS :

Here is our code :

const handleMessage = (event = {}) => {
    if (!event.nativeEvent) return;

    const payload = JSON.parse(event.nativeEvent.data);

    log('handleMessage', payload);

    switch (payload.event) {

(...) 

      case 'isNotation':
        return showInAppReview();
      default:
        return null;
    }
  };

  const showInAppReview = () => {
    if (InAppReview.isAvailable()) {
      InAppReview.RequestInAppReview()
          .then((hasFlowFinishedSuccessfully) => {
            console.log('InAppReview flow finished ', hasFlowFinishedSuccessfully);
          }).catch((error) => {
        console.log(error);
      });
    }
  }

The event "isNotation" is emitted via the front that we display in a webview, when a user submits a form. It is non-blocking, and not triggered by any call-to-action option.

Any help would be greatly appreciated.

fdobre commented 1 year ago

I am encountering the same issue.

RN 0.66.4
"react-native-in-app-review": "^3.3.2" or 
"react-native-in-app-review": "4.1.1", 

Dev mode everything looks OK. Production mode nothing happens when user tries to rate the app. I am not using any webview and rating used to work great in both android and iOS in 3.3.2 RN 0.64.

Everything looks OK on android for v4.1.1

Info:

 OS: macOS 12.5
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 1.50 GB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.10.0 - ~/.nvm/versions/node/v16.10.0/bin/node
    Yarn: 1.22.18 - /usr/local/bin/yarn
    npm: 7.24.0 - ~/.nvm/versions/node/v16.10.0/bin/npm
    Watchman: 2022.03.21.00 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.11.3 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
    Android SDK:
      API Levels: 26, 27, 28, 29, 30, 31, 32
      Build Tools: 27.0.3, 28.0.3, 29.0.0, 29.0.2, 29.0.3, 30.0.0, 30.0.2, 30.0.3, 31.0.0, 32.0.0, 32.1.0, 33.0.0, 33.0.0, 33.0.0, 33.0.0
      System Images: android-26 | Intel x86 Atom_64, android-26 | Google Play Intel x86 Atom, android-27 | Intel x86 Atom_64, android-27 | Google Play Intel x86 Atom, android-28 | Intel x86 Atom, android-28 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom, android-28 | Google X86_ARM Intel x86 Atom, android-29 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom_64, android-29 | Google Play Intel x86 Atom, android-29 | Google Play Intel x86 Atom_64, android-30 | Google APIs Intel x86 Atom, android-30 | Google APIs Intel x86 Atom_64, android-30 | Google Play Intel x86 Atom, android-30 | Google Play Intel x86 Atom_64, android-31 | Intel x86 Atom_64, android-31 | Google APIs ARM 64 v8a, android-31 | Google APIs Intel x86 Atom_64, android-31 | Google Play ARM 64 v8a, android-31 | Google Play Intel x86 Atom_64, android-32 | Google APIs Intel x86 Atom_64, android-32 | Google Play Intel x86 Atom_64, android-33 | Google APIs Intel x86 Atom_64, android-33 | Google Play Intel x86 Atom_64
      Android NDK: Not Found
  IDEs:
    Android Studio: 2021.1 AI-211.7628.21.2111.8193401
    Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_292 - /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.2 => 17.0.2 
    react-native: 0.66.4 => 0.66.4 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

@MinaSamir11 please let us know if there is any additional info that could help regarding this issue.

11OClock commented 1 year ago

I may have found where the issue is located : in XCode, tab "Build settings" > Packaging, the field "Product name" contained the character "é". Once I replaced this character with "e" and released the app in production, the review modal appeared ! For the record, this also solved a problem I had about notifications not working.

jforaker commented 1 year ago

@11OClock -- are you saying YOUR app had the bad character or the podfile for this library had the bad character?

Here's what I see for the pod: image

11OClock commented 1 year ago

Yes I'm talking about my app. Sorry, I wasn't very clear about that.

AdamTyler commented 1 year ago

I am also seeing this issue on iOS. RequestInAppReview promise returns hasFlowFinishedSuccessfully as true but the user never sees the modal. Thus we have no real way of knowing if the modal was actually shown or not.

    if (!InAppReview.isAvailable()) {
      return;
    }
    InAppReview.RequestInAppReview()
      .then(hasFlowFinishedSuccessfully => {
        console.log('InAppReview has lanuched successfully', hasFlowFinishedSuccessfully);
        // log event
      })
      .catch(err => {
        // log event
        console.log(err, 'RateTheApp.proceedToRateTheApp');
      });
RN 0.70.6
"react-native-in-app-review": "4.1.1", 
dsipahioglu commented 1 year ago

Hi there, were you able to solve this issue? I'm having the same issue right now on. Android works fine, but the "send" button in iOS isn't enabled even when on production mode.

react-native-in-app-review": "^4.1.1", RN 0.66.4

Anto2441 commented 1 year ago

Hi there, same issue as @dsipahioglu :

Android works fine, but the "send" button in iOS isn't enabled even when on production mode.

@MinaSamir11 Is it normal if the application is unlisted on the App Store ? Thanks in advance.