cordova-plugin-code-push
cordova-plugin-code-push copied to clipboard
Documentation for downloadProgress differs from implementation
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 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.
Closing as it should be fixed now.
Thanks for letting us know!