This repository was archived by the owner on May 20, 2025. It is now read-only.
v1.8.0-beta
·
1144 commits
to master
since this release
This release introduces a handful of highly requested features and some key bug fixes. It is now available on NPM and can be updated immediately by running npm i --save react-native-code-push@latest
.
New Features
- The
sync
method now accepts a new option calledmandatoryInstallMode
, which allows you to individually customize the install mode that is used for optional and mandatory updates. This new property defaults toInstallMode.IMMEDIATE
(which is what we've found most devs want), but can be changed by passing a different value when callingsync
(e.g.codePush.sync({ mandatoryInstallMode: codePush.InstallMode.ON_NEXT_RESUME })
). - The contents of the binary are now hashed and sent to the CodePush server so that we can detect whether an available update is equivalent to what the end-user is already running. This helps prevent the unnecessary first-run update issue, and we now encourage developers to release their binary contents to CodePush to help solve this scenario, as well as enable diff updates for the initial CodePush update after a fresh binary install/update.
- When we download a diff update from the server, and merge its contents together with the previous update (or binary contents), we now validate the contents of the entire update on the client-side to ensure integrity.
Bug Fixes
- We removed our use of
Promise.prototype.done
for compatibility with allPromise
implementations, since we were seeing instances where folks were overriding the default React Native polyfill - We fixed our podspec to support CodePush being built as a framework in Swift apps using CocoaPods.
- We removed the requirement for apps to include a patch component in their version (e.g.
2.0
as opposed to2.0.0
), so you can now release updates for apps, without needing to change your versioning policies - Added some better diagnostic logging in certain scenarios (e.g. when the native module wasn't properily configured).
Breaking Changes (General)
- With the addition of the new
mandatoryInstallMode
option forsync
(described above), by default, mandatory updates will now be installed immediately. From our experience, this is what most developers were already doing or wanted to do, but just keep this change in mind, since it's possible that it would impact your existing update experience once you upgrade the plugin.