diff --git a/CodePush.js b/CodePush.js index 1d1fac3..b884f60 100644 --- a/CodePush.js +++ b/CodePush.js @@ -219,8 +219,11 @@ function sync(options = {}, syncStatusChangeCallback, downloadProgressCallback) }; return new Promise((resolve, reject) => { - syncStatusChangeCallback(CodePush.SyncStatus.CHECKING_FOR_UPDATE); - checkForUpdate(syncOptions.deploymentKey) + CodePush.notifyApplicationReady() + .then(() => { + syncStatusChangeCallback(CodePush.SyncStatus.CHECKING_FOR_UPDATE); + return checkForUpdate(syncOptions.deploymentKey); + }) .then((remotePackage) => { var doDownloadAndInstall = () => { syncStatusChangeCallback(CodePush.SyncStatus.DOWNLOADING_PACKAGE); @@ -333,4 +336,4 @@ var CodePush = { } }; -module.exports = CodePush; \ No newline at end of file +module.exports = CodePush;