Releases: microsoft/react-native-code-push
v1.14.5-beta
Bug Fixes
@CodePushdecorator no longer binds lifecycle hooks if root component instance is not ES6 declared, because components declared viaReact.createClasshave their functions autobound by default. Binding them again like how we did previously results in a warning.- Fixed iOS download handler to properly handle HTTP >=400 errors and empty responses. Thanks @ymmuse!
v1.14.4-beta
Bug Fixes
- Allows activities hosting the React Native root view that don't extend
com.facebook.react.ReactActivityto also use the newloadBundlelogic which has a better user experience. - Fixed the hash mismatch happening after a diff update is installed due to
.DS_Storefiles on iOS.
v1.14.3-beta
New Features
-
This release simply adds the ability the option to specify an NSBundle other than the mainBundle in iOS.
jsCodeLocation = [CodePush bundleURLForResource:@"main" withExtension:@"jsbundle" subdirectory:nil bundle:[NSBundle bundleWithIdentifier: customBundleIdentifier]];
If left unspecified, it will default to
[NSBundle mainBundle]as per the original behavior.
v1.14.2-beta
This release improves the linking experience and fixes a bug with not being able to resolve the SoLoader library during runtime.
New Features
react-native link react-native-code-pushnow automates all of the linking process for you. For Android, it imports thereact-native-code-pushlibrary project for you and adds thecodepush.gradlebuild step insettings.gradleandandroid/app/build.gradle, prompts you for your deployment key and modifies theMainApplication/MainActivityjava file for you to include the CodePush react package and consult CodePush for the path to the root JS bundle file. For iOS, it similarly also adds the CodePush project to your XCode project, prompts you for your deployment key, adds it to yourInfo.plistfile, and updates yourAppDelegate.mfile to consult CodePush for the path to your root JS bundle file.
Bug Fixes
- Removed the dependency on SoLoader. We earlier relied on it being there as a transitive dependency of React Native, however after the release of React Native 0.31 where it was made an external dependency, there were some reported runtime issues with being unable to resolve the library.
v1.14.1-beta
This release primarily adds a decorator function which can be used to wrap your root component in a higher order component that handles syncing updates with the CodePush server. Refer to the README for ways to use it.
New Features
- The default export of
react-native-code-pushcan now also be used as a decorator function which takes in some options and wraps your root component in a higher order "CodePush" component. This component then handles syncing with the server for updates for you. Internally, the higher order component callscodePush.sync()at the right trigger events (e.g. when the app resumes). It also ensures thatnotifyAppReady()is called when the component mounts, so issues like #360 wouldn't happen.
Going forward, we intend to have this new decorator function be the primary way in which users instrument their app with CodePush instead of calling codePush.sync() directly, although the old method still works and can be used.
v1.13.6-beta
This release primarily adds support for overriding the app version used to query for updates, along with a few bug fixes.
New Features (General)
- Adds an
overrideAppVersion()function that can be used to specify a custom application binary interface version, which would otherwise default to the app store version built into the app. This is an option for advanced users who have their own app store versioning system that they'd like to update independently to their ABI version. It also enables beta distribution for developers who would not like to increment their app store version between each iteration.
Bug Fixes
- When the
updateDialogis shown while the app is in the background (such as when a new activity is launched), aNullPointerExceptioncan arise. This has been fixed in this release.
v1.13.5-beta
This release simply includes an enhancement by @joshuafeldman to allow users to specify the binary packaged root JS bundle in a subdirectory of the main bundle via
[CodePush bundleURLForResource:withExtension:subdirectory:]
Thanks!
v1.13.3-beta
This includes a few bug fixes:
- Ensures that lint errors in our plugin don't break the build of the host app
- Guards against
NullPointerExceptions ingetConfigurationfor Android by using thereactContextinstead ofgetCurrentActivitywhich is nullable. - Fixes 'unchecked call' warnings on classes obtained through reflection on Android
- Fixes an issue with the
currentActivitygoing into the background during anIMMEDIATEinstall on Android causing aNullPointerExceptionwhen trying to invoke methods on the result ofgetCurrentActivity. The fix adds the resume handler onIMMEDIATEinstalls so that when the activity returns to the foreground, the update will be applied.
v1.13.2-beta
This release
- Fixes a bug with the app crashing as a result of installing the same update multiple times
- Improves the legacy restart logic by using the finalized
currentActivityfromloadBundleto prevent null pointer exceptions, and by using theActivity.recreate()method instead of finishing and re-launching theActivityvia anIntent, which results in a better user experience
v1.13.0-beta
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
CodePushclass includes a new constructor which accepts theMainApplicationinstance, instead of theMainActivityinstance, which allows it to be initialized within the newReactNativeHostobject 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.getBundleFileJava method asCodePush.getJSBundleFileto be more idiomatic with the respective methods in theReactNativeHostandReactActivityclasses.CodePush.getBundleFileis now marked as deprecated and will be removed in a future release.
New Features (General)
- The object returned from
getUpdateMetadatais now a fully-compliantLocalPackageinstance (e.g. includes aninstallmethod). Thanks @nevir for this contribution! - The
notifyAppReadymethod now returns aStatusReportobject 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+.