New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

react-native-appirater

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-appirater

react native wrapper around ios app review library

latest
npmnpm
Version
1.0.0
Version published
Weekly downloads
8
-11.11%
Maintainers
1
Weekly downloads
 
Created
Source

react-native-appirater

react-native wrapper around ios app rating component

##Installation

First you need to install react-native-appirater:

npm install react-native-appirater --save

Installation (iOS)

In XCode, in the project navigator, right click Libraries ➜ Add Files to [your project's name] ➜ Go to node_modules ➜ react-native-appirater and add the .xcodeproj file

In XCode, in the project navigator, select your project. Add the lib*.a from the appirater project to your project's Build Phases ➜ Link Binary With Libraries. Then, click on the .xcodeproj file you added before in the project navigator, and go the Build Settings tab. Make sure 'All' is toggled on (instead of 'Basic'). Look for Header Search Paths and make sure it contains both $(SRCROOT)/../react-native/React and $(SRCROOT)/../../React - mark both as recursive.

Installation (Android)

  • android impl taken mostly from https://github.com/drewjw81/appirater-android

  • In android/settings.gradle

...
include ':RNAppirater'
project(':RNAppirater').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-appirater/android')
  • In android/app/build.gradle
...
dependencies {
  ...
  compile project(':RNAppirater')
}
  • Register the module (in MainActivity.java)
import com.wynnej1983.RNAppirater.*; // <--- import

public class MainActivity extends Activity {
  ...

    @Override
    protected List<ReactPackage> getPackages() {
      return Arrays.<ReactPackage>asList(
        new MainReactPackage(),
        new RNAppirater()            //  <--- add here
      );
    }
    
    @Override  // <--- add this method, the next 4 lines
    protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      RNAppirater.appLaunched(this);
    }
  }
}

Usage

Usage (iOS)

Usage (Android)

Copy the /res/values/appirater-settings.xml from the AppiraterAndroid library in to your projects /res/values/ folder and adjust the settings to your preference.

Note on Usage

Example


//import module
import Appirater from 'react-native-appirater';

componentWillMount() {
  //set app id
  Appirater.setAppId('123');
  Appirater.setDebug(true);
  Appirater.appLaunched(true);
  Appirater.appEnteredForeground(true);
}
...

//register user significant event
`Appirater.userDidSignificantEvent();`

Keywords

react-native

FAQs

Package last updated on 14 Apr 2016

Did you know?

Socket

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.

Install

Related posts