react-native-code-push

React Native module for CodePush

OTHER License

Downloads
544.1K
Stars
9K
Committers
182

Bot releases are hidden (Show)

react-native-code-push - v1.12.1-beta

Published by lostintangent over 8 years ago

This release simply fixes an issue when trying to install the CodePush plugin via CocoaPods.

react-native-code-push - v1.12.0-beta

Published by lostintangent over 8 years ago

This release includes a few bug fixes as well as a really cool feature contribution from @dbasedow. It is now available on NPM and can be installed via npm i --save react-native-code-push@latest.

New Features

  1. Restarts can be disallowed during critical end user workflows The Javascript API exposes a new disallowRestart method which allows a component to ensure that no programmatic update restarts can occur while it is mounted (resulting in a "quick flash" that some users may think is a crash). This can help prevent end user interruptions during periods where it would be unacceptable (e.g. an on boarding process), but without preventing the app to discover and download available updates as soon as possible (via a call to allowRestart). Check out the docs for more details.

Bug Fixes

  1. Our podspec includes a new NoZip subspec to allow apps that already include SSZipArchive to link with CodePush, without receiving duplicate symbol errors
  2. A bug was fixed with install metrics reporting when an update is successfully installed after a previous update had been rolled back.
  3. Our package.json file now indicates where our *.d.ts file is located, so that supporting editors (e.g. VS Code) can provide auto-completion support for our API out-of-the-box.
react-native-code-push - v1.11.0-beta

Published by rub8n over 8 years ago

This release includes support for React Native app's targeting Windows (UWP), fixes support for iOS7 and improves the reliability of the install metrics reporting. It is now available on NPM and can be installed via npm i --save react-native-code-push@latest.

New features (Windows)

  1. Windows (UWP) support – Adds initial pass at supporting the Windows platform. Code as well as asset updates are fully supported but we still need to add metrics support, hashing of the stored binary contents as well as recent perf improvements generated by throttling of download progress events.

Bug Fixes (General)

  1. Retry install metrics after failure - Improves the install metrics mechanism in order to make sure that telemetry isn't lost due to poor network conditions.

Bug Fixes (iOS)

  1. Fix support for iOS7 – Changes our implementation to provide iOS7 workarounds for Obj-C APIs only supported on iOS8+.
react-native-code-push - v1.10.6-beta

Published by lostintangent over 8 years ago

This release primarily includes performance improvements to the update download process (for both iOS and Android), and also fixes a critical user-reported bug on iOS. It is now available on NPM and can be installed via npm i --save react-native-code-push.

Performance Improvements

  1. The download progress events that are triggered when calling either sync or RemotePackage.download are no longer dispatched to the JS thread unless the app actually specified a downloadProgressCallback. Additionally, even if an app subscribed to download progress events, we now throttle them along with the device's vsync, so that the CodePush plugin doesn't overwhelm the JS thread with more events than it can actually render, and ensures that we impose a small impact as little an impact on the app's frame rate as possible.

Bug Fixes (iOS)

  1. CodePush updates are now explicitly excluded from iTunes and/or iCloud backups, which ensures that they don't impact the end users storage capacity, and also prevents any App Store rejections based on their storage guidelines.
react-native-code-push - v1.10.5-beta

Published by lostintangent over 8 years ago

This is just a quick bug fix release that addresses a regression with the client-side rollback feature on Android devices.

react-native-code-push - v1.10.4-beta

Published by lostintangent over 8 years ago

This is just a quick bug fix release that addresses an issue that could occur when an update is downloaded while the app is in the foreground, but finished installing after it has been put into the background.

react-native-code-push - v1.10.3-beta

Published by lostintangent over 8 years ago

This is just a quick bug fix release that also improves upon the existing getCurrentPackage method. It is now available on NPM and can be updated immediately by running npm i --save react-native-code-push@latest.

New Features

  1. Metadata about the currently running update can now be reliably retrieved The existing getCurrentPackage method allowed programmatically retrieving the metadata for CodePush updates (e.g. what is its label? is it mandatory?), but unfortunately, it would always return the "latest" locally available update, which could either be the running update or a pending update. Therefore, there wasn't a reliable way to get the metadata for the update that is currently running, that disregarded any pending updates To address this, we are deprecating the getCurrentPackage method and replacing it with a new getUpdateMetadata method that allows explicitly specifying whether you want the metadata for the running, pending or latest (using the same behavior as getCurrentPackage) update. Check out the docs for more details.

    import codePush, { UpdateState } from "react-native-code-push";
    
    // Reliably get the running update metadata
    // Both of these calls are equivalent
    codePush.getUpdateMetadata();
    codePush.getUpdateMetadata(UpdateState.RUNNING);
    
    // Check if there is a pending update, and if so, get its metadata
    codePush.getUpdateMetadata(UpdateState.PENDING);
    
    // Provides the same behavior as the existing getCurrentPackage method.
    // The return object still contains the isPending property to determine
    // if the latest update is pending or not.
    codePush.getUpdateMetadata(UpdateState.LATEST);
    
  2. The notifyApplicationReady method has been aliased as notifyAppReady to be more consistent with the use of "App" instead of "Application" in most React Native APIs (e.g. AppRegistry, AppState). To prevent a breaking change, notifyApplicationReady isn't removed, but our docs will prescribe the new alias moving forward.

Bug Fixes (iOS)

  1. We resolved a bug where CodePush updates on disk weren't correctly being cleared after bumping the app version when using React Native packager as opposed to specifying [CodePush bundleURL] as your JS bundle location.
react-native-code-push - v1.10.2-beta

Published by lostintangent over 8 years ago

This is just a quick bug fix release that addresses a few commonly reported issues. It is now available on NPM and can be updated immediately by running npm i --save react-native-code-push@latest.

Bug Fixes

  1. Fixed an issue with programmatic restarts (e.g. calling CodePush.restartApp, specifying any InstallMode value other than ON_NEXT_RESTART when calling sync) on pre-KitKat Android devices.
  2. Removed the pre-release version tag from our podspec (-beta), which was causing issues for apps being submitted to iTunes Connect. We could have just documented this workaround, but it seemed like a better solution for our users to just remove it on our end, since our NPM packages and GitHub releases already include the -beta semantics.
react-native-code-push - v1.10.1-beta

Published by lostintangent over 8 years ago

This release primarily improves some of the fundamentals of CodePush for Android and deepens our integration with RNPM (we hope to do more more in the future!). It is now available on NPM and can be updated immediately by running npm i --save react-native-code-push@latest.

New Features (Android)

  1. App restarts are now much smoother for the end user Previously, when an app was restarted in order to apply a CodePush update, we would stop and re-start the Activity that represented the current React Native app. While this method worked, it had the effect of being a fairly obtrusive user experience. This release improves the restart by doing a reload of the React Native bridge, which is able to re-use the existing Activity and simply results in a quick "flash" when reloading the new JS bundle file. This experience mirrors what we already have on iOS and should be a lot nicer for your users.

  2. RNPM-based installs now generate the CodePush package code correctly When you run rpm link react-native-code-push, it will update your MainActivity class with the right constructor call to the CodePush class (instead of generating new CodePush() which isn't a valid signature), which further simplifies the installation experience.

  3. RNPM-based installs now prompt you for your CodePush deployment key If you're using RNPM >=1.6.0 (we recommend it!), when you run rpm link react-native-code-push, you will be prompted for your Android deployment key, which will be used to auto-populate your MainActivity file. You can choose to ignore this for now and specify it later using our configuration instructions. We hope to add support for iOS as soon as RNPM allows automating the creation of Info.plist entries.

    Install prompt

react-native-code-push - v1.10.0-beta

Published by lostintangent over 8 years ago

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)

  1. 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.
  2. The CodePush.getBundleUrl Java method now includes an overloaded version that takes no parameters, and assumes your JS bundle name is index.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)

  1. The CodePush class itself is now a ReactPackage, and therefore, you can construct an instance of it, and directly add it to the list of packages in your MainActivity.getPackages method. Because of this, the CodePush.getReactPackage method has been removed from the CodePush 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.
  2. The CodePush.getBundleUrl method is now static, which allows you to easily call it from within your MainActivity.getJSBundleFile method, without needing to maintain a local member variable for the CodePush class instance. View the updated Android install docs for more details about how this method is expected to be used now.
react-native-code-push - v1.9.0-beta

Published by lostintangent over 8 years ago

This release introduces a couple of highly-requested features, as well as 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

  1. Added client-side support for the new release rollout feature in the CLI This version of the React Native SDK is required in order to begin taking advantage of this new capability, so make sure to upgrade your apps before attempting to release updates with a rollout percentage. More details

    code-push release-react MyApp ios --rollout 25%
    
  2. Added support for throttling resume-based installs We've seen a lot of developers want to use the resume-based install strategy, in order to get their updates in front of their end users sooner. However, forcing a restart on the next resume might be too obtrusive if the user switched away from the app for only a few seconds (e.g. to respond to a text). In order to help get updates in front of users sooner, while still respecting their workflow, the sync method now accepts a new option called minimumBackgroundDuration that specifies the number of seconds that the app needs to have been in the background before forcing the install. More details

    // If the app was in the background for 10 minutes, we assume that it is "safe" to restart to install the update
    codePush.sync({ installMode: codePush.InstallMode.ON_NEXT_RESUME, minimumBackgroundDuration: 10 * 60 });
    

Bug Fixes (General)

  1. When an update is downloaded from the CodePush server, the plugin now looks for the JS bundle file using the exact same file name that was specified as being contained in the binary (via either [CodePush bundleURL] or CodePush.getBundleURL), as opposed to looking for the first file with a .jsbundle, .bundle or .js extension. This makes the update E2E more reliable, and prevents issues for apps that use local <WebView> hosted content.

Bug Fixes (iOS)

  1. The contents of the app binary are now successfully hashed for apps that aren't using React Native assets
  2. A custom error message is displayed when using [CodePush bundleURL] in your AppDelegate.m file, and deploying a debug build to the iOS Simulator. React Native doesn't generate a JS bundle in the binary in this circumstance, and it has confused many CodePush users. To help alleviate the confusion, we now explain the issue as well as a few possible workarounds.

Bug Fixes (Android)

  1. Cleaned up a bunch of lint warnings that didn't impact behavior, but may have been noisy for devs integrating CodePush into a native Android app
  2. Fixed an interop bug for apps that are using CodePush along with the Fabric SDK
react-native-code-push - v1.8.0-beta

Published by lostintangent over 8 years ago

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

  1. The sync method now accepts a new option called mandatoryInstallMode, which allows you to individually customize the install mode that is used for optional and mandatory updates. This new property defaults to InstallMode.IMMEDIATE (which is what we've found most devs want), but can be changed by passing a different value when calling sync (e.g. codePush.sync({ mandatoryInstallMode: codePush.InstallMode.ON_NEXT_RESUME })).
  2. 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.
  3. 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

  1. We removed our use of Promise.prototype.done for compatibility with all Promise implementations, since we were seeing instances where folks were overriding the default React Native polyfill
  2. We fixed our podspec to support CodePush being built as a framework in Swift apps using CocoaPods.
  3. We removed the requirement for apps to include a patch component in their version (e.g. 2.0 as opposed to 2.0.0), so you can now release updates for apps, without needing to change your versioning policies
  4. Added some better diagnostic logging in certain scenarios (e.g. when the native module wasn't properily configured).

Breaking Changes (General)

  1. With the addition of the new mandatoryInstallMode option for sync (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.

Breaking Changes (iOS)

  1. We refactored the code a little bit, and because of this, when you update, you'll need to fix the Xcode project reference for CodePush. This just requires re-running step #2 from here again, using the new xcodeproj path in the docs.
react-native-code-push - v1.7.3-beta

Published by lostintangent over 8 years ago

This is a bug fix release which addresses a user-reported iOS issue and also introduces a small breaking change for apps using getCurrentPackage. It is now available on NPM and can be updated immediately by running npm i --save react-native-code-push@latest.

Bug Fixes (iOS)

  1. When the Promise returned by getCurrentPackage was rejected (rare but possible), the native-side wasn't properly returning from the method, and therefore, it would attempt to resolve the Promise as well, which would result in a "Callback with id [ID] not found" error.

Breaking Changes

  1. The getCurrentPackage method now returns null when the currently running JS bundle is coming from the binary and not from a CodePush update. This is the behavior that most people expected, but in case you're using getCurrentPackage and not currently checking for a null object as the resolved value of its Promise, you need to make sure to update that. Note that this isn't a server change, and therefore, existing production apps are unaffected. This breaking change only affects apps that upgrade to 1.7.3+ and continue calling getCurrentPackage without checking for null.
react-native-code-push - v1.7.2-beta

Published by lostintangent over 8 years ago

This is a bug fix release which addresses some key user-reported issues. It is now available on NPM and can be updated immediately by running npm i --save react-native-code-push@latest.

Bug Fixes (General)

  1. We saw a few cases where apps were inadvertently calling the sync method multiple times concurrently (e.g. they called sync in componentDidMount as well as an AppState change handler), which had the potential to put the app in a weird state. Now, when sync is called, and a previous sync call is still in progress (e.g. an update is downloading), it will resolve the promise with a new sync status of SYNC_IN_PROGRESS. That way, we can safeguard the runtime from getting into a bad state, while still providing the app with an indication of why each sync call completed.

Bug Fixes (iOS)

  1. If a developer's desktop clock wasn't synchronized with their testing device (i.e. it was significantly ahead of it), it would be possible to hit an issue where your app downloads a CodePush update, but after restart, continues to use the JS bundle that was shipped with the binary. This was because the [CodePush bundleURL] logic saw that the binary bundle was newer than the CodePush update, and therefore, gave it precedence. We no longer rely on this time-based heuristic for detecting whether to use the binary or CodePush update on app start, and therefore, this issue would no longer be possible in the rare cases that we saw it.

Bug Fixes (Android)

  1. We removed the superfluous NDK config from our build.grade file (we don't have any C++ code!), which was causing compilation errors for apps that use both the NDK and CodePush.
react-native-code-push - v1.7.1-beta

Published by lostintangent over 8 years ago

This is simply a bug fixing release that adds better logging for diagnostic purposes and re-enables install telemetry to be reported while debugging.

react-native-code-push - v1.7.0-beta

Published by lostintangent over 8 years ago

This release introduces the long-awaited support for updating assets on Android! This feature depends on React Native v0.19.0, so you'll need to update to that version of the platform in order to consume this CodePush release. We think it's extremely worth it though! (e.g. you get new debugging support for unhandled promises). This update is now available in NPM and can be installed immediately!

New Features (Android)

  1. Deploy updates to your assets on Android via CodePush. This works exactly like it does for iOS: instead of simply uploading your JS bundle to CodePush, you upload a directory containing your bundle and assets, and everything works great. The server supports differential updates, so your end-users will only get the files that changed between releases (i.e. they won't have to download all of your assets every time you release an update). Check out the CLI docs for the release command for more details.

New Features (iOS)

  1. We added a new method to the CodePush class called setDeploymentKey which allows you to dynamically set your deployment key in Objective-C, as opposed to specifying it in the Info.plist file.

Breaking Changes

  1. This release depends on React Native 0.19.0, so if you choose to upgrade CodePush, then you need to also upgrade your React Native dependency.
  2. The newly added install metrics feature now only reports data to the server in release builds. Therefore, if you are testing your app and want to see this data populated in the CLI, you'll need to generate a release build first. This change was made to reduce noise from the metrics that are generated during debugging.
react-native-code-push - v1.6.0-beta

Published by lostintangent over 8 years ago

This release primarily introduces the necessary client-side telemetry to support the new install metrics of the CLI. You can view the details of this feature here. This version is now available in NPM and can be installed immediately!

New Features

  1. Update installations and rollbacks are now reported to the CodePush server in order to enable the CLI to display these metrics. You can find details about this feature here.

Bug Fixes

  1. The Android platform implementation no longer requires your app's Activity to inherit from FragmentActivity in order to display an update dialog prompt. This was necessary for enabling React Native 0.18.0, since it now makes use of a base class (ReactActivity) which doesn't itself inherit from FragmentActivity.
react-native-code-push - v1.5.3-beta

Published by lostintangent almost 9 years ago

This release is primarily meant to address an iOS compilation error that was introduced by React Native 0.18.0-RC (see details below), but it also includes a few other fixes and a minor feature enhancement. It is now available on NPM and can be upgraded to immediately.

Bug Fixes (iOS)

  1. In order to perform a programmatic app restart after an update has been installed, the CodePush plugin needs to update the RCTBridge.bundleURL property to point at the latest JS bundle file on disk. React Native 0.18.0 made this property readonly (in it's interface), and therefore, cause a compilation error with our plugin, since we could no longer set it. At runtime, this property is still readwrite, so we simply use KVC to set the property, instead of relying on the "dot syntax" that the compiler didn't like. In the future, we'll use the more appropriate solution of importing the new RCTBridge+Private.h header file, but for now, we wanted to maintain backwards combat so that this release didn't force all of our users to upgrade to React Native 0.18.0-RC.

Bug Fixes (General)

  1. Update assets (e.g. the JS bundle and images) weren't being removed from disk after being automatically rolled back due to a crash. This wouldn't have impacted the user experience, and unless you released a significant amount of CodePush updates that included a crash (please don't do this!), this wouldn't result in much disk space being used either. That said, we don't want to consume any more of the end users storage capacity than is absolutely necessary, so this was an important fix for cleanliness sake.
  2. Internal CodePush state (e.g. the list of updates that have previously failed) wasn't being properly cleared when a new binary was installed. It would be pretty rare for this behavior to have caused any issues, but it's more deterministic for us to treat each new binary installation as a "clean slate" since we can't make many assumptions about the new "environment" (e.g. which CodePush updates will work within it).

Feature Enhancements

  1. The restartApp method now includes an optional parameter that lets you specify whether you want to always restarts the app, or only if there is a pending update. This makes it simpler to implement a "forced restart" solution at some well-known point within your app (after installing a non-immediate update), without having to check LocalPackage.isPending before calling restartApp.
react-native-code-push - v1.5.2-beta

Published by lostintangent almost 9 years ago

This release fixes a bug with the rollback protection feature that would occur in some circumstances on iOS when deploying React Native assets.

react-native-code-push - v1.5.1-beta

Published by lostintangent almost 9 years ago

This is largely a bug-fix release to address a regression, but it also introduces a small feature request. It can be immediately acquired from NPM and includes the following improvements:

New Features (iOS and Android)

  1. The LocalPackage object returned by calling getCurrentPackage now includes an isPending property which indicates whether or not the most recently installed update has actually been applied yet via a restart.

Bug fixes (iOS and Android)

  1. We fixed a regression that caused immediately-applied updates to automatically rollback in certain situations.