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

Commit 7c10a9a

Browse files
author
Will Anderson
committed
Copy over remaining methods
1 parent 58b7da4 commit 7c10a9a

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,34 @@ Contains details about an update package that is available for download.
101101
### Methods
102102
- __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.
103103

104+
105+
## codePush.checkForUpdate
106+
Queries the Code Push server for updates.
107+
```javascript
108+
codePush.checkForUpdate(): Promise<RemotePackage>;
109+
```
110+
111+
`checkForUpdate` returns a Promise that resolves when the server responds with an update.
112+
113+
114+
Usage:
115+
```javascript
116+
codePush.checkForUpdate().then((update) => {
117+
console.log(update);
118+
});
119+
```
120+
121+
## codePush.getCurrentPackage
122+
```javascript
123+
codePush.getCurrentPackage(): Promise<LocalPackage>;
124+
```
125+
Get the currently installed package information. Returns a Promise that resolves with the local package.
126+
127+
## codePush.notifyApplicationReady
128+
```javascript
129+
codePush.notifyApplicationReady(): Promise<void>;
130+
```
131+
132+
Notifies the plugin that the update operation succeeded.
133+
Calling this function is required if a rollbackTimeout parameter is passed to your ```LocalPackage.apply``` call.
134+
If automatic rollback was not used, calling this function is not required and will result in a noop.

0 commit comments

Comments
 (0)