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

latest releases: 7.0.5, 7.0.4, 7.0.3...
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.

Don't miss a new react-native-code-push release

NewReleases is sending notifications on new releases.