npm react-native-code-push 1.5.0-beta
v1.5.0-beta

latest releases: 7.0.5, 7.0.4, 7.0.3...
8 years ago

This is largely a bug fix release for the Android platform, that also introduces a breaking change for both iOS and Android (hence the minor version bump). Because of this breaking change, you need to uninstall your app from the emulator/devices your testing against before upgrading. It can be immediately acquired from NPM, and includes the following improvements:

Breaking Changes (iOS and Android)

  1. The rollbackTimeout parameter of both the sync and LocalPackage.install methods have been removed. We received a lot of feedback regarding this parameter being pretty confusing, and it also required devs to opt-in to receiving client-side rollback protection. We believe that this behavior is extremely important for doing production deployments, and therefore, in order to be more prescriptive, calling sync and LocalPackage.install will now automatically enable rollback protection, and it cannot be disabled (why would you want to do that anyways?)

    If you are calling sync on app start (e.g. the componentDidMount method of your root component), then you don't need to do anything else. Your updates will be made available to users, but if you accidentally release something bad, you can rest assured that your users will be automatically rolled back. However, if you are calling sync somewhere else (e.g. button click, within a periodic timer), you MUST call notifyApplicationReady after your app has successfully started (e.g. in your root component's componentDidMount event), which lets the CodePush runtime know that the update is valid and won't automatically roll the end-user back to the previous version.


    We've found that the vast majority of users are calling sync in componentDidMount, and therefore, this change automatically makes your deployments more reliable, without doing any work!

Bug Fixes (Android)

  1. When dev support is enabled, the React Native runtime attempts to load the JS bundle from a locally available cache. This can create a confusing workflow when using CodePush, since it's possible to install an update, restart the app, and not see the changes applied. This occurs because the app might still be using the older cached file, and CodePush is effectively not being consulted. The CodePush plugin now deletes the React Native cache whenever an update is installed. This will have the effect of loading the JS bundle from the packager (if running), or the bundle file downloaded from CodePush.
  2. There were some instances where an installed update wouldn't be correctly applied when running your app in an emulator. This has now been addressed, and updates should work great across all emulators and devices.

Don't miss a new react-native-code-push release

NewReleases is sending notifications on new releases.