Skip to content

CodePush service is hot update services which adapter react-native-code-push and cordova-plugin-code-push - 热更新

License

Notifications You must be signed in to change notification settings

mediabc/code-push-server

 
 

Repository files navigation

CodePush Server source

NPM

NPM Version Node.js Version Linux Status Windows Status Coverage Status Dependency Status Known Vulnerabilities Licenses

CodePush Server is a CodePush progam server! microsoft CodePush cloud is slow in China, we can use this to build our's. I use qiniu to store the files, because it's simple and quick! Or you can use [local/s3/oss/tencentcloud] storage, just modify config.js file, it's simple configure.

Support Storage mode

  • local storage bundle file in local machine
  • qiniu storage bundle file in qiniu
  • s3 storage bundle file in aws
  • oss storage bundle file in aliyun
  • tencentcloud storage bundle file in tencentcloud

Proper Usage of Code-Push Hot Updates

  • Apple Apps allow hot updates according to Apple's developer agreement. To maintain a good user experience, silent updates are required. Google Play does not allow silent updates and requires a dialog to inform users about App updates. Chinese Android markets require silent updates (if a dialog prompt is shown, the App will be rejected with the reason "Please upload the latest version of the binary application package").
  • React Native bundle packages are different for different platforms, so you must create different applications to distinguish them when using code-push-server (e.g., CodePushDemo-ios and CodePushDemo-android).
  • React-native-code-push only updates resource files and does not update Java and Objective C. Therefore, when upgrading npm dependency package versions, if the dependency package uses native implementations, you must change the application version number (modify CFBundleShortVersionString in Info.plist for iOS, modify versionName in build.gradle for Android), then recompile the app and publish it to the app store.
  • It is recommended to use the code-push release-react command to publish applications, as this command combines packaging and publishing commands (e.g., code-push release-react CodePushDemo-ios ios -d Production).
  • Every time you submit a new version to the App Store, you should also publish an initial version to code-push-server based on that submission version. (This is because code-push-server will compare each subsequent version with the initial version to generate patch versions.)

shell login

$ code-push login http://api.code-push.com #login

Visit: http://www.code-push.com

client eg.

ReactNative CodePushDemo

Cordova CodePushDemo

HOW TO INSTALL code-push-server

DEFAULT ACCOUNT AND PASSWORD

  • account: admin
  • password: 123456

HOW TO USE

ISSUES

code-push-server normal solution

An unknown error occurred

modify password

UPDATE TIME LINE

  • targetBinaryVersion support
    • *
    • 1.2.3
    • 1.2/1.2.*
    • 1.2.3 - 1.2.7
    • >=1.2.3 <1.2.7
    • ~1.2.3
    • ^1.2.3

Advance Feature

use google diff-match-patch calculate text file diff patch

  • support iOS and Android
  • use "react-native-code-push": "git+https://[email protected]/lisong/react-native-code-push.git" instead "react-native-code-push": "x.x.x" in package.json
  • change apps.is_use_diff_text to 1 in mysql codepush database

License

MIT License read

About

CodePush service is hot update services which adapter react-native-code-push and cordova-plugin-code-push - 热更新

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 94.8%
  • Pug 3.9%
  • Other 1.3%