Skip to content

Latest commit

 

History

History
43 lines (22 loc) · 1.5 KB

File metadata and controls

43 lines (22 loc) · 1.5 KB

@appzung/react-native-code-push v11.0.0-rc3


@appzung/react-native-code-push / sync

Function: sync()

sync(options?, syncStatusChangedCallback?, downloadProgressCallback?, handleBinaryVersionMismatchCallback?): Promise<SyncStatus>

Allows checking for an update, downloading it and installing it, all with a single call.

Unless you need custom UI and/or behavior, we recommend most developers to use this method when integrating CodePush into their apps, if they are not using the withCodePush HOC.

Parameters

options?

SyncOptions

Options used to configure the end-user update experience (e.g. show a prompt?, install the update immediately?).

syncStatusChangedCallback?

SyncStatusChangedCallback

An optional callback that allows tracking the status of the sync operation, as opposed to simply checking the resolved state via the returned Promise.

downloadProgressCallback?

DownloadProgressCallback

An optional callback that allows tracking the progress of an update while it is being downloaded.

handleBinaryVersionMismatchCallback?

HandleBinaryVersionMismatchCallback

An optional callback for handling target binary version mismatch

Returns

Promise<SyncStatus>