React Native module for CodePush
OTHER License
Bot releases are visible (Hide)
Published by lostintangent almost 9 years ago
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:
rollbackTimeout
parameter of both the sync
and LocalPackage.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, calling sync
and LocalPackage.install
will now automatically enable rollback protection, and it cannot be disabled (why would you want to do that anyways?) If you are calling sync
on app start (e.g. the componentDidMount
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 calling sync
somewhere else (e.g. button click, within a periodic timer), you MUST call notifyApplicationReady
after your app has successfully started (e.g. in your root component's componentDidMount
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. sync
in componentDidMount
, and therefore, this change automatically makes your deployments more reliable, without doing any work!Published by lostintangent almost 9 years ago
This is a bug fix release that addresses the following issues and can be immediately acquired via NPM:
sync
(e.g. missing deployment key in Info.plist
file), that error message is now logged to the console (e.g. adb logcat
, Chrome, Xcode console). Previously, we would only log "Unknown error", which wasn't particularly useful. If an app was calling done
on the Promise
returned by sync
, any errors would have resulted in a red box, so this issue only really impacted scenarios where the error was being completely swallowed and the console didn't provide any indication of the cause.Documents
folder, whereas the iOS guidelines recommend using the Library\Application Support
directory for content that shouldn't be end-user visible. Because of this change, you should uninstall your app from any devices or simulators in order to clean out the Documents
folder. The plugin automatically cleans out old updates when installing a new one, but with this fix, it won't attempt to clean out the Documents
folder anymore. This won't impact any user experience, however, it's just for cleanliness sake.Published by lostintangent almost 9 years ago
This is a bug fix release which addresses the following two issues:
sync
method wasn't calling notifyApplicationReady
as was intended. This has been addressed, and therefore, when you are calling sync
on app start, and specifying a rollbackTimeout
, you don't have to manually call notifyApplicationReady
, sincePublished by lostintangent almost 9 years ago
This release introduces support for updating images via CodePush using the new React Native assets system. It currently only works for iOS, but we're working on Android support. In the meantime, you can still use CodePush and the new assets system on Android, and nothing will break, you just won't be able to add/edit images via CodePush like you can with iOS.
In order to support this change, we needed to rely on v0.15.0 of React Native, so if you're still using v0.14.*, we recommend sticking with v1.3.0 of CodePush. That said, we think the new asset system is awesome, and is way worth upgrading, so we encourage you to do it :)
Additionally, once you are using the assets system, you are no longer simply releasing updates of your JS bundle file, and therefore, you'll need to change your CodePush workflow a little bit. Refer to the docs for all the details here. We promise that it's still simple!
Note: If you aren't using the new React Native assets system, then you can continue to release only your JS bundle to CodePush, and rely on your images to be loaded from the binary. CodePush won't break this workflow in any way.
libz
library with your app (we use it to unzip updates which contain the JS bundle and images). Refer to step #5 in the iOS installation section of the docs to see how to do this. If you upgrade your plugin and see a bunch of weird errors, this is likely the reason.Published by lostintangent almost 9 years ago
This is a bug fix release that ensures the actual update download runs on a background thread (Android only), and fixes a regression with the mandatory update message displayed as part of the sync
method. Thanks to @oney for these contributions!
Published by lostintangent almost 9 years ago
This is a significant release that contains many new features as well as some breaking changes. Please refer to the docs for more information regarding the behavior of the following API additions/modifications. You can update your react-native-code-push
installation from NPM immediately to take advantage of these improvements.
sync
method now include a syncStatusChangedCallback
parameter, which allows you to listen for state changes in the overall update process (e.g. update is available, download starting) and respond accordingly. This allows you to let the sync
method handle the entire update process, while still having the option to display custom UI and/or perform additional behavior as needed.sync
and RemotePackage.download
methods now include a downloadProgressCallback
parameter, which allows you to listen to progress events when an available update is being downloaded. This was a very common request and allows you to choose to show a download progress modal experience in your app.sync
and LocalPackage.install
method now accept an InstallMode
parameter which allows you to determine whether the update should be installed immediately (the previous behavior), on the next app restart (to support fully silent installs) or on the next app resume.sync
method now accepts an updateDialog
parameter, which allows you to enable/disable the user confirmation, as well as customize its strings when displayed. The change, along with the InstallMode
change above is what fully enables "silent updates" (see below for breaking changes with sync
).sync
and checkForUpdate
methods now accept an optional deploymentKey
parameter, which allows you to override the value that was specified in the Info.plist
file (iOS) or MainActivity.java
(Android). This enables you to build your app against a specific deployment (i.e. Production) and then dynamically "redirect" it at a different deploymentrestartApp
method was added to the react-native-code-push
module, which allows your app to force a restart at any time. This can be useful when you choose not to install an available update immediately (e.g. when performing "silent" updates), but your app has a deterministic event that can be used to "force" the update instead of waiting for the user to restart/resume the app (e.g. when a form is submitted or a user navigates to the home route).[CodePush bundleURL]
method, which assumes your JS bundle is named main.jsbundle
, the CodePush
class now includes a bundleURLForResource:
method (which lets you override the bundle name) and the bundleURLForResource:withExtension:
method (which lets you override both the bundle name and extension).sync
method is now "silent" by default, and therefore, no longer displays the user prompt when an update is available, and also doesn't immediately restart the app after installing the update. This change was made based on lots of feedback. If you want to achieve the old behavior, you simply need to enable the updateDialog
option and change the InstallMode
to immediate when calling sync: codePush.sync({ userDialog: true, installMode: codePush.InstallMode.IMMEDIATE })
.LocalPackage.apply
method has been renamed to install
to better reflect what it's actually doing.getBundleUrl
method of the CodePush
class has been renamed to bundleURL
Published by lostintangent almost 9 years ago
This is a bug fix update, which addresses the following issues:
This release has been published to NPM and is the recommended version for all developers.