0.1.2 • Published 6 years ago

tnrn-code-push v0.1.2

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

npm react-native MIT bitHound Score Downloads

Push code updates to your react-native apps. 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-code-push and link it manually (see below).

iOS

  • React Native < 0.29 (Using rnpm)

    rnpm install tnrn-code-push

  • React Native >= 0.29

    $npm install -S tnrn-code-push

    $react-native link tnrn-code-push

Manually

  1. Add node_modules/tnrn-code-push/ios/tnrnCodePush.xcodeproj to your xcode project, usually under the Libraries group
  2. Add libtnrnASPickerView.a (from Products under tnrnCodePush.xcodeproj) to build target's Linked Frameworks and Libraries list

Android

  • React Native < 0.29 (Using rnpm)

    rnpm install tnrn-code-push

  • React Native >= 0.29

    $npm install -S tnrn-code-push

    $react-native link tnrn-code-push

Manually

  1. JDK 7+ is required
  2. Android NDK is required
  3. Add the following snippet to your android/settings.gradle:

    include ':tnrn-code-push'
    project(':tnrn-code-push').projectDir = new File(rootProject.projectDir, '../node_modules/tnrn-code-push/android')
  4. Declare the dependency in your android/build.gradle

    dependencies {
        ...
        compile project(':tnrn-code-push')
    }
  5. Import import io.tnrn.codepush.UpdatePackage; and register it in your MainActivity (or equivalent, RN >= 0.32 MainApplication.java):

    @Override
    protected List<ReactPackage> getPackages() {
        return Arrays.asList(
                new MainReactPackage(),
                new UpdatePackage()
        );
    }

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

Have fun! :metal:

Documentation

Contribution

Thanks

@reactnativecn - react-native-pushy ReactNative中文网推出的代码热更新服务

此项目代码fork自 react-native-pushy

Questions

Feel free to contact me or create an issue

made with ♥