Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
react-native-store-review
Advanced tools
Rate on App Store or Google Play directly in your React Native app
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).
# 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
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();
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)
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.
requestReview()
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>
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.
FAQs
Rate on App Store or Google Play directly in your React Native app
We found that react-native-store-review demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.