This release primarily introduces a simplified public Java API, that is also more compatible with RNPM, and should make integrating CodePush into React Native Android apps a little easier. It is now available on NPM and can be updated immediately by running npm i --save react-native-code-push@latest
.
New Features (Android)
- RNPM-based installation is now fully supported and documented We had to make a few breaking changes to our Java API to achieve this (see below for details), but we believe it will be worth it in the long run, since RNPM will greatly simplify adding CodePush to new projects and/or re-installing it in existing projects after performing a React Native upgrade. View the updated Android install docs for more details.
- The
CodePush.getBundleUrl
Java method now includes an overloaded version that takes no parameters, and assumes your JS bundle name isindex.android.bundle
. This is what most people name it, so this is just a simple codification of an already ubiquitous convention. More details
Breaking Changes (Android)
- The
CodePush
class itself is now aReactPackage
, and therefore, you can construct an instance of it, and directly add it to the list of packages in yourMainActivity.getPackages
method. Because of this, theCodePush.getReactPackage
method has been removed from theCodePush
class since it is no longer needed. View the updated Android install docs for more details about how this class is expected to be used now. - The
CodePush.getBundleUrl
method is now static, which allows you to easily call it from within yourMainActivity.getJSBundleFile
method, without needing to maintain a local member variable for theCodePush
class instance. View the updated Android install docs for more details about how this method is expected to be used now.