This repository was archived by the owner on May 20, 2025. It is now read-only.
v1.5.0-beta
·
1452 commits
to master
since this release
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)
- The
rollbackTimeout
parameter of both thesync
andLocalPackage.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, callingsync
andLocalPackage.install
will now automatically enable rollback protection, and it cannot be disabled (why would you want to do that anyways?)
If you are callingsync
on app start (e.g. thecomponentDidMount
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 callingsync
somewhere else (e.g. button click, within a periodic timer), you MUST callnotifyApplicationReady
after your app has successfully started (e.g. in your root component'scomponentDidMount
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 callingsync
incomponentDidMount
, and therefore, this change automatically makes your deployments more reliable, without doing any work!
Bug Fixes (Android)
- 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.
- 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.