Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 58b7da4

Browse files
author
Will Anderson
committed
Add documentation for LocalPackage and RemotePackage
1 parent b3af19c commit 58b7da4

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,37 @@ Running Tests
6767
* Navigate to the test explorer (small grey diamond near top left)
6868
* Click on the 'play' button next to CodePushDemoAppTests
6969
* After the tests are completed, green ticks should appear next to the test cases to indicate success
70+
71+
72+
## LocalPackage
73+
Contains details about an update package that has been downloaded locally or already applied (currently installed package).
74+
### Properties
75+
- __deploymentKey__: Deployment key of the package. (String)
76+
- __description__: Package description. (String)
77+
- __label__: Package label. (String)
78+
- __appVersion__: The native version of the application this package update is intended for. (String)
79+
- __isMandatory__: Flag indicating if the update is mandatory. (Boolean)
80+
- __packageHash__: The hash value of the package. (String)
81+
- __packageSize__: The size of the package, in bytes. (Number)
82+
83+
### Methods
84+
- __apply(applySuccess, applyError, rollbackTimeout)__: Applies this package to the application. The application will be reloaded with this package and on every application launch this package will be loaded.
85+
If the rollbackTimeout parameter is provided, the application will wait for a codePush.notifyApplicationReady() for the given number of milliseconds.
86+
If codePush.notifyApplicationReady() is called before the time period specified by rollbackTimeout, the apply operation is considered a success.
87+
Otherwise, the apply operation will be marked as failed, and the application is reverted to its previous version.
88+
89+
## RemotePackage
90+
Contains details about an update package that is available for download.
91+
### Properties
92+
- __deploymentKey__: Deployment key of the package. (String)
93+
- __description__: Package description. (String)
94+
- __label__: Package label. (String)
95+
- __appVersion__: The native version of the application this package update is intended for. (String)
96+
- __isMandatory__: Flag indicating if the update is mandatory. (Boolean)
97+
- __packageHash__: The hash value of the package. (String)
98+
- __packageSize__: The size of the package, in bytes. (Number)
99+
- __downloadUrl__: The URL at which the package is available for download. (String)
100+
101+
### Methods
102+
- __download(downloadSuccess, downloadError)__: Downloads the package update from the Code Push service. The ```downloadSuccess``` callback is invoked with a ```LocalPackage``` argument, representing the downloaded package.
103+

0 commit comments

Comments
 (0)