cordova-plugin-code-push icon indicating copy to clipboard operation
cordova-plugin-code-push copied to clipboard

Documentation for downloadProgress differs from implementation

Open mvanderlinde opened this issue 10 years ago • 2 comments

Within the README/documentation, there is a code sample that defines downloadProgress (within codePush.sync()) as follows:

function downloadProgress(totalBytes, receivedBytes) {
    // Update "downloading" modal with current download %
}

However, the function actually expects a single object with two properties, so the actual implementation is more along the lines of:

function downloadProgress(progress) {
    // Update "downloading" modal using progress.totalBytes and progress.receivedBytes
}

mvanderlinde avatar May 05 '16 18:05 mvanderlinde

@mvanderlinde Were you calling out just the Cordova readme? We have it correctly on the tutorial area but seems like we forgot to update the Cordova readme. I'll take a look and update accordingly.

rub8n avatar May 05 '16 23:05 rub8n

Closing as it should be fixed now.

Thanks for letting us know!

rub8n avatar May 06 '16 00:05 rub8n