tnrn-splash-screen

1.0.1 • Public • Published

npm react-native MIT Downloads

友盟推送 React Native.

Getting Started

First, cd to your RN project directory, and install RNMK through rnpm . If you don't have rnpm, you can install RNMK from npm with the command npm i -S tnrn-umeng-push and link it manually (see below).

iOS

  • #### React Native < 0.46 (Using rnpm)

    rnpm install tnrn-umeng-push

  • #### React Native >= 0.46 $npm install -S tnrn-umeng-push

    $react-native link tnrn-umeng-push

Manually

  1. Add node_modules/tnrn-umeng-push/ios/RNUMPush.xcodeproj to your xcode project, usually under the Libraries group
  2. Add libRNUMPush.a (from Products under RNUMPush.xcodeproj) to build target's Linked Frameworks and Libraries list
  3. Add ocr framework to $(PROJECT_DIR)/Frameworks.

Android

  • #### React Native < 0.46 (Using rnpm)

    rnpm install tnrn-umeng-push

  • #### React Native >= 0.46 $npm install -S tnrn-umeng-push

    $react-native link tnrn-umeng-push

Manually

  1. JDK 7+ is required
  2. Add the following snippet to your android/settings.gradle:
include ':tnrn-umeng-push'
project(':tnrn-umeng-push').projectDir = new File(rootProject.projectDir, '../node_modules/tnrn-umeng-push/android/app')
  1. Declare the dependency in your android/app/build.gradle
dependencies {
    ...
    compile project(':tnrn-umeng-push')
}
  1. Import import io.tnrn.splashscreen.SplashScreenPackage; and register it in your MainActivity (or equivalent, RN >= 0.32 MainApplication.java):
@Override
protected List<ReactPackage> getPackages() {
    return Arrays.asList(
            new MainReactPackage(),
            new SplashScreenPackage(MainActivity.activity, true)
    );
}

Finally, you're good to go, feel free to require tnrn-umeng-push in your JS files.

Have fun! 🤘

Basic Usage

Import library

import RNUMPush from 'tnrn-umeng-push'

Questions

create an issue

made with ♥

Package Sidebar

Install

npm i tnrn-splash-screen

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

30.5 kB

Total Files

18

Last publish

Collaborators

  • winterw