Giter Site home page Giter Site logo

oblador / react-native-store-review Goto Github PK

View Code? Open in Web Editor NEW
730.0 5.0 53.0 842 KB

Rate on App/Play Store directly in your React Native app

License: MIT License

JavaScript 2.88% Java 54.99% Objective-C 11.39% Ruby 14.61% Objective-C++ 8.43% TypeScript 7.70%
react-native appstore ios rating review android playstore

react-native-store-review's Introduction

react-native-store-review

This module exposes the native APIs to ask the user to rate the app in the iOS App Store or Google Play store directly from within the app (requires iOS >= 12.4 or Android 5.0 with Google Play store installed).

Rating Dialog

Installation

# Add dependency
yarn add react-native-store-review
# Link iOS dependency
pod install --project-directory=ios
# Compile project
react-native run-ios # or run-android

Usage

The intention of this API is to ask the user to rate the app as a part of the user journey, typically as the user completes a task. Since it's not possible to know if a dialog will be shown or not you should not call it as a result of tapping a button, but rather as a side effect of an event happening in the app.

import * as StoreReview from 'react-native-store-review';

StoreReview.requestReview();

Button

If you want to show a button or provide a fallback for OS versions not supporting these APIs, you can redirect the user to the respective stores to review the app there instead.

import { Linking, Platform } from 'react-native';

const APP_STORE_LINK = `itms-apps://apps.apple.com/app/id${IOS_APP_ID}?action=write-review`;
const PLAY_STORE_LINK = `market://details?id=${ANDROID_APP_ID}`;

const STORE_LINK = Platform.select({
  ios: APP_STORE_LINK,
  android: PLAY_STORE_LINK,
});

export const openReviewInStore = () => Linking.openURL(STORE_LINK)

References

Troubleshooting

The dialog is not showing in the correct language on iOS

The strings in the dialog comes from the OS, if your translations are purely in JavaScript land you need to add meta data so iOS understand which languages you support, see the official documentation.

The dialog is not showing when I call requestReview()

(1)

For iOS you have to add LSApplicationQueriesSchemes as Array param to Info.plist and add itms-apps as one of params in this array to link appstore.

For example:

<key>LSApplicationQueriesSchemes</key>
<array>
  <string>itms-apps</string>
</array>
or (2)

The dialog is not showing while testing with TestFlight but will be working normally once in production (source). Furthermore it will not work for enterprise apps as they are not available on the App Store, and Apple/Google will restrict the amount of times the API can be called to a few times per year in order prevent misuse.

react-native-store-review's People

Contributors

anback avatar doctorjohn avatar dylancom avatar evanwalsh avatar ezebecke avatar frenberg avatar iroachie avatar jorisw avatar koenpunt avatar lolobosse avatar mainak-shil avatar makenova avatar nsundberg avatar oblador avatar radko93 avatar rodolfogs avatar simonemarinelli avatar sudoplz 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  avatar  avatar

react-native-store-review's Issues

Submit button is disabled.

On dev and prod(not the version downloaded from App Store), the submit button is disable so I can't complete the review.
Screenshot 2023-09-29 at 23 03 30

Leave a review - text is not visible...

I have a strange behaviour. Everything works fine, but when a user clicks to leave a review, the optional comment review section is all bg color when you type your review in. The title section comes out fine with black text. But the review section text is the same as bg color and you cant see what you are typing. I tested it out in several devices and same issue... please help! I even tried react-native-rate and same issue there...

Android: In App Review not launching on Samsung S10 (One Plus device working fine)

Current Behavior
I am trying to test In App Review on Android on my Samsung S10 (Android 10). It only flashes the status bar and throws a mute exception as described below. This does not crash the app but does nothing on the UI as well. I tried the same thing on a One Plus device and everything is working fine. I get a dialog every time in the internal testing track.

E/Parcel: Class not found when unmarshalling: d.b.a.f.a.c.e
    java.lang.ClassNotFoundException: d.b.a.f.a.c.e
        at java.lang.Class.classForName(Native Method)
        at java.lang.Class.forName(Class.java:454)
        at android.os.Parcel.readParcelableCreator(Parcel.java:3350)
        at android.os.Parcel.readParcelable(Parcel.java:3284)
        at android.os.Parcel.readValue(Parcel.java:3186)
        at android.os.Parcel.readArrayMapInternal(Parcel.java:3579)
        at android.os.BaseBundle.initializeFromParcelLocked(BaseBundle.java:292)
        at android.os.BaseBundle.unparcel(BaseBundle.java:236)
        at android.os.BaseBundle.getString(BaseBundle.java:1196)
        at android.content.Intent.getStringExtra(Intent.java:8889)
        at com.android.server.wm.ActivityStarter.executeRequest(ActivityStarter.java:1122)
        at com.android.server.wm.ActivityStarter.execute(ActivityStarter.java:888)
        at com.android.server.wm.ActivityTaskManagerService.startActivityAsUser(ActivityTaskManagerService.java:1706)
        at com.android.server.wm.ActivityTaskManagerService.startActivityAsUser(ActivityTaskManagerService.java:1556)
        at com.android.server.wm.ActivityTaskManagerService.startActivity(ActivityTaskManagerService.java:1508)
        at android.app.IActivityTaskManager$Stub.onTransact(IActivityTaskManager.java:1649)
        at android.os.Binder.execTransactInternal(Binder.java:1190)
        at android.os.Binder.execTransact(Binder.java:1159)

Expected Behavior
Open the In App Review on Samsung S10 (Android 10)

Environment

software version
Android
react-native-store-review 0.2.0
react-native 0.63.3
node v12.16.1
yarn 1.22.4

app:checkDebugDuplicateClasses issue

any clue what to do with the following build issue:

* What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
   > Duplicate class com.google.android.play.core.common.IntentSenderForResultStarter found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-core-common-2.0.2-runtime (com.google.android.play:core-common:2.0.2)
     Duplicate class com.google.android.play.core.common.LocalTestingException found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-core-common-2.0.2-runtime (com.google.android.play:core-common:2.0.2)
     Duplicate class com.google.android.play.core.common.PlayCoreDialogWrapperActivity found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-core-common-2.0.2-runtime (com.google.android.play:core-common:2.0.2)
     Duplicate class com.google.android.play.core.listener.StateUpdatedListener found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-core-common-2.0.2-runtime (com.google.android.play:core-common:2.0.2)
     Duplicate class com.google.android.play.core.review.ReviewException found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
     Duplicate class com.google.android.play.core.review.ReviewInfo found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
     Duplicate class com.google.android.play.core.review.ReviewManager found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
     Duplicate class com.google.android.play.core.review.ReviewManagerFactory found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
     Duplicate class com.google.android.play.core.review.model.ReviewErrorCode found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
     Duplicate class com.google.android.play.core.review.model.zza found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
     Duplicate class com.google.android.play.core.review.testing.FakeReviewManager found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
     Duplicate class com.google.android.play.core.review.zza found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
     Duplicate class com.google.android.play.core.review.zzb found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
     Duplicate class com.google.android.play.core.review.zzc found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
     Duplicate class com.google.android.play.core.review.zzd found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
     Duplicate class com.google.android.play.core.review.zze found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
     Duplicate class com.google.android.play.core.review.zzf found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
     Duplicate class com.google.android.play.core.review.zzg found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
     Duplicate class com.google.android.play.core.review.zzh found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
     Duplicate class com.google.android.play.core.review.zzi found in modules jetified-core-1.10.3-runtime (com.google.android.play:core:1.10.3) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)

I tried to add

    implementation(project(":react-native-store-review")) {
        exclude group: 'com.google.android.play', module: 'core-common'
        exclude group: 'com.google.android.play', module: 'review'
    }

in app/build.gradle but while it compiles, it then crash at runtime saying there is no interface method.

NullPointerException: Attempt to invoke virtual method 'Context.getPackageName' on a null object reference

Hello, I have this crash in Crashlytics. I think that maybe its happening in a race conditions when I call StoreReview.requestReview() and the user send the app to background. However at the moment I couldn't reproduce it.

Devices affected:

Android 11: 100%
Device Status: 100% in background
Brands:
 - 50% Motorolla
 - 50% Teleepoch - WindRiver

Environment:

react-native: 0.72.4
react-native-store-review: 0.4.1

Crash:

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
       at android.content.ComponentName.<init>(ComponentName.java:131)
       at android.content.Intent.<init>(Intent.java:6870)
       at com.google.android.play.core.review.zzd.launchReviewFlow(com.google.android.play:review@@2.0.1:3)
       at com.oblador.storereview.StoreReviewModuleImpl.lambda$requestReview$0(StoreReviewModuleImpl.java:23)
       at com.oblador.storereview.StoreReviewModuleImpl$$ExternalSyntheticLambda0.onComplete(:4)
       at com.google.android.gms.tasks.zzi.run(com.google.android.gms:play-services-tasks@@18.0.2:1)
       at android.os.Handler.handleCallback(Handler.java:938)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loop(Looper.java:223)
       at android.app.ActivityThread.main(ActivityThread.java:7725)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:952)

Fix: #86

Nothing happened in the development environment. What am I doing wrong or missing?

I have an app published on Google Play. I did the following in the development environment but nothing happened. I tested it on real device. My Google Play account is registered to the test account. Nothing happened in the development environment. What am I doing wrong or missing? Thanks.

  • I downloaded.
    npm i react-native-store-review

  • I imported.
    import * as StoreReview from 'react-native-store-review';

  • Code

    React.useEffect(() => {
        StoreReview.requestReview();
    }, []);

0.60+ autolinking instructions

I managed to get this working on 0.60 by yarn adding it and pod install in the ios directory

I'm not sure if that's actually the right route, but if it is, it would be good to add this to the docs! Happy to submit a PR

Android build error Duplicate class com.google.android.play.core.common.IntentSenderForResultStarter found

Duplicate class com.google.android.play.core.common.IntentSenderForResultStarter found in modules jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0) and jetified-core-common-2.0.0-runtime (com.google.android.play:core-common:2.0.0)
     Duplicate class com.google.android.play.core.common.LocalTestingException found in modules jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0) and jetified-core-common-2.0.0-runtime (com.google.android.play:core-common:2.0.0)
     Duplicate class com.google.android.play.core.common.PlayCoreDialogWrapperActivity found in modules jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0) and jetified-core-common-2.0.0-runtime (com.google.android.play:core-common:2.0.0)
     Duplicate class com.google.android.play.core.listener.StateUpdatedListener found in modules jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0) and jetified-core-common-2.0.0-runtime (com.google.android.play:core-common:2.0.0)
     Duplicate class com.google.android.play.core.review.ReviewInfo found in modules jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0) and jetified-review-2.0.0-runtime (com.google.android.play:review:2.0.0)
     Duplicate class com.google.android.play.core.review.ReviewManager found in modules jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0) and jetified-review-2.0.0-runtime (com.google.android.play:review:2.0.0)
     Duplicate class com.google.android.play.core.review.ReviewManagerFactory found in modules jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0) and jetified-review-2.0.0-runtime (com.google.android.play:review:2.0.0)
     Duplicate class com.google.android.play.core.review.testing.FakeReviewManager found in modules jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0) and jetified-review-2.0.0-runtime (com.google.android.play:review:2.0.0)
"react-native-store-review": "0.2.1",

Possible conflict with:

 "react-native-wonderpush": "^2.2.4",
System:
    OS: macOS 13.0.1
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 61.95 MB / 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 22.1, iOS 16.1, macOS 13.0, tvOS 16.1, watchOS 9.1
    Android SDK:
      API Levels: 26, 27, 28, 29, 30, 31, 32, 33
      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, 31.0.0, 32.0.0, 32.1.0, 33.0.0, 33.0.0, 33.0.0, 33.0.0, 33.0.1
      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, 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.3 AI-213.7172.25.2113.9014738
    Xcode: 14.1/14B47b - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.11 - /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: ^18.0.0 => 18.2.0 
    react-native: 0.69.6 => 0.69.6 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

App crashes when requesting for review

I am developing an app that uses this module to ask for a review. The thing is: the app is freezing after the alert appears.

I don't know if it helps, but I'm also having this on the console:

Required dispatch_sync to load constants for RNStoreReview. This may lead to deadlocks

We could not catch any exceptions.

[Android] StoreReview.requestReview() is not working

To replicate this issue run the Example included in the repo...
As you can see on the attached video the lib works properly on iOS but it neither works on Android nor throws any error pinpointing the possible reason of the failure:

Untitled.mov

Any idea @oblador?

Do not use this with a button

According to the Apple Developer guidelines

Because this method may or may not present an alert, it's not appropriate to call it in response to a button tap or other user action.

I would suggest including this in the README just so it's explicit.

This had me tapping my head for some time trying to figure out why it was failing to show in my app, even though it worked in development. Well, folks, if anyone else is having this issue, that's why. However, do not despair, there is a workaround:

import {
  Linking,
  Platform,
} from 'react-native';


const APP_STORE_LINK = `itms-apps://itunes.apple.com/app/${IOS_APP_ID}?action=write-review`;
const PLAY_STORE_LINK = `market://details?id=${ANDROID_APP_ID}`;

const STORE_LINK = Platform.select({
  ios: APP_STORE_LINK,
  android: PLAY_STORE_LINK,
});

export default {
  requestReview: () => Linking.openURL(STORE_LINK),
};

Callback for user action

First of all: Great Library. I really appreciate your work on that. It really helps me out. I want to know if it is possible to get a callback on what the user clicked: "Not now" or did he submit the review. I am not familiar with the native class.
Thank you!

Wrong instruction in npm

Hey, you still have wrong instruction on the npm page
Screenshot 2021-04-20 at 11 42 19

It took some time to figure the problem out.

'StoreKit/SKStoreReviewController.h' file not found

After installing and linking the package I am getting a build failure that says "'StoreKit/SKStoreReviewController.h' file not found". Anyone have any ideas for a solution?

Two things that may be relevant are: I am still on Xcode 8.2.1 and my RN version is .38.

Thanks!

Not working on Android

Hey. Can you help me with this issue, please.
Error Message:
WARN Possible Unhandled Promise Rejection (id: 0):
Error: StoreReview native module not available, did you forget to link the library?
requestReview@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.bypantry.bypantry&modulesOnly=false&runModule=true:338393:22
http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.bypantry.bypantry&modulesOnly=false&runModule=true:328346:34
tryCallOne@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.bypantry.bypantry&modulesOnly=false&runModule=true:23437:16
http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.bypantry.bypantry&modulesOnly=false&runModule=true:23518:27
_callTimer@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.bypantry.bypantry&modulesOnly=false&runModule=true:24432:17
_callImmediatesPass@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.bypantry.bypantry&modulesOnly=false&runModule=true:24466:17
callImmediates@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.bypantry.bypantry&modulesOnly=false&runModule=true:24637:33
__callImmediates@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.bypantry.bypantry&modulesOnly=false&runModule=true:4630:35
http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.bypantry.bypantry&modulesOnly=false&runModule=true:4442:34
__guard@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.bypantry.bypantry&modulesOnly=false&runModule=true:4614:15
flushedQueue@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.bypantry.bypantry&modulesOnly=false&runModule=true:4441:21
flushedQueue@[native code]
callFunctionReturnFlushedQueue@[native code]

Platform: Android
Captura de Tela 2023-11-29 às 22 50 36

For iOs worked

Can you add a successful and failed callback?

Great plugins!
But the popup scoring view has network latency, I need to know when it will be displayed, or because it will fail for a silent reason and give the user friendly hints.

requestReview() doesn't trigger the rating prompt in android

we have put the app in the google play internal test track

and my Gmail is added as a tester

and I've downloaded the app from google play

and I have not reviewed the app before

but nothing shows up when requestReview() and in the dev mood only the 'available' appears.

                onPress={() => {
                  if (StoreReview.isAvailable) {
                    console.warn('available');
                    StoreReview.requestReview();
                  }
                }}
                text="Write your review"
              />

"react-native-store-review": "^0.2.0",

"react-native": "0.63.4",

device android version : 9

android 31

build fails on sdk 31

seems like it needs compileSdkVersion update to either 30 or 31

Return boolean indicating success

Hey there! Thanks for publishing this package.

Would it be possible to add a boolean indicating whether the user rated the app or not? If so, how can it be done

I'm down to contributing it, just need some hints as I haven't done native development

Thanks in advance!

RCTBridgeModule 'file now found' issues

#ISSUE
I tried the 3 ways of linking the lib to ios but this doesnt seem to be working fine (beside andorid which works just fine).
Issue happening is shown below:

In file included from /Users/studocu/development/app/node_modules/react-native-store-review/ios/RNStoreReview.h:2:
../../react-native/React/Base/RCTBridgeModule.h:10:9: fatal error: 'React/RCTDefines.h' file not found
#import <React/RCTDefines.h>
        ^~~~~~~~~~~~~~~~~~~~

1 error generated.



** BUILD FAILED **

Some people suggesting changes in React-native folders and so on. Not sure how to make this work though!?

FYI:
react-native-cli: 2.0.1
react-native: 0.58.6
Xcode 10.2
react-native-store-review: 0.1.5

Can display the prompt more than 3 times in a year

This might not be a bug... but I can show the review prompt over and over again, even when using StoreReview.isAvailable, according to the Apple docs it says for up to three prompts in a 365-day period - Do I need to manage this myself or should the library not allow me to call the method to show the prompt?

React Native Bridge Warning (v0.51)

I am seeing the following warning in xcode when using the module.

2018-01-05 04:48:38.266 [warn][tid:main][RCTModuleData.mm:69] Module RNStoreReview requires main queue setup since it overrides constantsToExport but doesn't implement requiresMainQueueSetup. In a future release React Native will default to initializing all native modules on a background thread unless explicitly opted-out of.

React Native Version: 0.51.0
iOS: 11.2
Device: iPhone 8 Simulator

EXC_BAD_ACCESS crash when offline

Repro:

  1. Put phone in airplane mode on iOS
  2. Call StoreReview.requestReview()

Result:
EXC_BAD_ACCESS in JavaScriptCore:JSStringRetain. App crashes.

Expected:
This should not crash the app even if the phone is not connected to the internet.

FWIW, this same crash happens in react-native-in-app-review as well, so maybe it's iOS?

Do I need to know that the user will see it for the first time?

Hi, do I need to know that the user will see it for the first time?

After a certain step in the my application StoreReview.requestReview(); I'm thinking of running it. But I don't know the user's status.

StoreReview.requestReview(); should it be run once? Will it still show if it was previously shown to the user or if the user has commented before?

Thanks.

"Submit" cannot be clicked

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

Can anyone give some advice? Thank you

bc

Can't build the app because make erros concerning the lib

Error message:

version is 1.1.15.
e: /Users/fejori/Work/snackin/snackin/node_modules/react-native-store-review/android/src/main/java/com/oblador/storereview/StoreReviewModule.kt: (16, 16): Unresolved reference: mutableMapOf
e: /Users/fejori/Work/snackin/snackin/node_modules/react-native-store-review/android/src/main/java/com/oblador/storereview/StoreReviewModule.kt: (16, 56): Unresolved reference: to
e: /Users/fejori/Work/snackin/snackin/node_modules/react-native-store-review/android/src/main/java/com/oblador/storereview/StoreReviewPackage.kt: (16, 16): Unresolved reference: emptyList

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-store-review:compileDebugKotlin'.
> Compilation error. See log for more details

package.json:

{
  ...
  "resolutions": {
    "styled-components": "^5"
  },
  "dependencies": {
    "@amplitude/react-native": "^2.16.1",
    "@react-native-async-storage/async-storage": "^1.17.10",
    "@react-native-clipboard/clipboard": "^1.11.1",
    "@react-native-community/netinfo": "^9.3.6",
    "@react-native-picker/picker": "^2.4.8",
    "@react-navigation/bottom-tabs": "^6.4.0",
    "@react-navigation/native": "^6.0.13",
    "@react-navigation/native-stack": "^6.9.1",
    "@react-navigation/stack": "^6.3.3",
    "@sentry/react-native": "^4.7.1",
    "async-mutex": "^0.4.0",
    "base-64": "^1.0.0",
    "credit-card-type": "^9.1.0",
    "date-fns": "^2.29.3",
    "email-validator": "^2.0.4",
    "events": "^3.3.0",
    "jwt-decode": "^3.1.2",
    "lottie-react-native": "^5.1.4",
    "node-cache": "^5.1.2",
    "react": "17.0.2",
    "react-native": "0.68.1",
    "react-native-animatable": "^1.3.3",
    "react-native-animated-pagination-dot": "^0.4.0",
    "react-native-background-timer": "^2.4.1",
    "react-native-bootsplash": "^4.3.2",
    "react-native-camera": "^3.40.0",
    "react-native-check-version": "^1.0.20",
    "react-native-config": "^1.4.11",
    "react-native-confirmation-code-field": "^7.3.1",
    "react-native-device-info": "^10.3.0",
    "react-native-geolocation-service": "^5.3.1",
    "react-native-gesture-handler": "^2.8.0",
    "react-native-image-picker": "^4.10.0",
    "react-native-maps": "^1.3.2",
    "react-native-masked-text": "^1.13.0",
    "react-native-modal": "^13.0.1",
    "react-native-onesignal": "^4.4.1",
    "react-native-permissions": "^3.6.1",
    "react-native-picker-select": "^8.0.4",
    "react-native-safe-area-context": "^4.4.1",
    "react-native-screens": "^3.18.2",
    "react-native-snackbar": "^2.4.0",
    "react-native-sound": "^0.11.2",
    "react-native-store-review": "^0.2.1",
    "react-native-svg": "^13.4.0",
    "react-native-svg-transformer": "^1.0.0",
    "react-native-version-number": "^0.3.6",
    "react-native-view-pdf": "^0.14.0",
    "react-native-webview": "^11.23.1",
    "react-native-wifi-reborn": "^4.7.0",
    "socket.io-client": "^4.5.3",
    "styled-components": "^5.3.6"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@babel/runtime": "^7.12.5",
    "@react-native-community/eslint-config": "^2.0.0",
    "babel-jest": "^26.6.3",
    "eslint": "^7.32.0",
    "jest": "^26.6.3",
    "metro-react-native-babel-preset": "^0.67.0",
    "react-test-renderer": "17.0.2"
  },
  "jest": {
    "preset": "react-native"
  }
}

App crashes when requesting for review

Description

I was testing this library using the Xcode simulator and it was working. But after showing the alert a bunch of times the app is now unusable after calling StoreReview.requestReview().

Reproduction

  1. Open app in simulator
  2. Repeat this a bunch of times until the app becomes unusable

Code

import { useEffect } from 'react'
import * as StoreReview from 'react-native-store-review'

export default function AppReview() {
  /* Open app review alert */
  useEffect(() => {
    // This API is only available on iOS >= 10.3 or Android API >= 21
    if (StoreReview.isAvailable) {
      StoreReview.requestReview()
    } 
  }, [])
  return null
}

Version

"react-native-store-review": "^0.2.0",
"react-native": "0.63.4",

What happens when app is in Dev?

The app rating prompt comes up in dev. Just wondering what happens if I were to submit a review for the non production build.

Thanks

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.