@appzung/react-native-code-push v11.0.0-rc7
@appzung/react-native-code-push / LocalPackage
Represents a downloaded update that is either already running, or has been installed and is pending an app restart.
appVersion:
string
The app binary version that this update is dependent on. This is the value that was specified via the --target-binary-version parameter when calling the CLI's release command.
description:
string
The description of the update. This is the same value that you specified in the CLI when you released the update.
failedInstall:
boolean
Indicates whether this update has been previously installed but was rolled back.
The sync
method will automatically ignore updates which have previously failed, so you only need to worry about this property if using checkForUpdate
.
isFirstRun:
boolean
Indicates whether this is the first time the update has been run after being installed.
This is useful for determining whether you would like to show a "What's New?" UI to the end user after installing an update.
isMandatory:
boolean
Indicates whether the update is considered mandatory. This is the value that was specified in the CLI when the update was released.
isPending:
boolean
Indicates whether this update is in a "pending" state. When true, that means the update has been downloaded and installed, but the app restart needed to apply it hasn't occurred yet, and therefore, its changes aren't currently visible to the end-user.
label:
string
The internal label automatically given to the update by the CodePush server. This value uniquely identifies the update within its release channel.
packageHash:
string
The SHA hash value of the update.
packageSize:
number
The size of the code contained within the update, in bytes.
releaseChannelPublicId:
string
The release channel public ID that was used to originally download this update.
Package
.releaseChannelPublicId
install(
installMode
?,minimumBackgroundDuration
?,onUpdateInstalled
?):Promise
<void
>
Installs the update by saving it to the location on disk where the runtime expects to find the latest version of the app.
Indicates when you would like the update changes to take effect for the end-user.
number
For resume-based installs, this specifies the number of seconds the app needs to be in the background before forcing a restart. Defaults to 0 if unspecified.
() => void
| Promise
<void
>
An optional promise called after app installation
Promise
<void
>