This release primarily adds support for configuring CodePush in Android apps using React Native v0.29+. It also adds a few bug fixes and minor enhancements. It is available now on NPM and can be installed via the following command: npm i --save react-native-code-push@latest
.
New Features (Android)
- Added support for Android in React Native v0.29! The
CodePush
class includes a new constructor which accepts theMainApplication
instance, instead of theMainActivity
instance, which allows it to be initialized within the newReactNativeHost
object which is used in React Native v0.29. Check out the updated docs for details on how to configure CodePush with this React Native version. - We aliased the
CodePush.getBundleFile
Java method asCodePush.getJSBundleFile
to be more idiomatic with the respective methods in theReactNativeHost
andReactActivity
classes.CodePush.getBundleFile
is now marked as deprecated and will be removed in a future release.
New Features (General)
- The object returned from
getUpdateMetadata
is now a fully-compliantLocalPackage
instance (e.g. includes aninstall
method). Thanks @nevir for this contribution! - The
notifyAppReady
method now returns aStatusReport
object which indicates whether an update was successfully installed or rolled back. Thanks @nevir for this contribution!
Bug Fixes
- Binary hashing has been fixed in React Native v0.29+ Our plugin supports hashing the contents of the binary in order to prevent installing an update that is equivalent to what was shipped in the store. Unfortunately, this feature was broken for a few releases due to a change in React Native itself, but it now works correctly in React Native v0.29+.