@@ -58,6 +58,10 @@ async function checkForUpdate(deploymentKey = null) {
5858 * client app is resilient to a potential issue with the update check.
5959 */
6060 if ( ! update || update . updateAppVersion || ( update . packageHash === localPackage . packageHash ) ) {
61+ if ( update && update . updateAppVersion ) {
62+ log ( "An update is available but it is targeting a newer binary version than you are currently running." ) ;
63+ }
64+
6165 return null ;
6266 } else {
6367 const remotePackage = { ...update , ...PackageMixins . remote ( sdk . reportStatusDownload ) } ;
@@ -136,12 +140,7 @@ function log(message) {
136140}
137141
138142async function notifyApplicationReady ( ) {
139- await NativeCodePush . notifyApplicationReady ( ) ;
140- if ( __DEV__ ) {
141- // Don't report metrics if in DEV mode.
142- return ;
143- }
144-
143+ await NativeCodePush . notifyApplicationReady ( ) ;
145144 const statusReport = await NativeCodePush . getNewStatusReport ( ) ;
146145 if ( statusReport ) {
147146 const config = await getConfiguration ( ) ;
@@ -254,7 +253,12 @@ async function sync(options = {}, syncStatusChangeCallback, downloadProgressCall
254253 return CodePush . SyncStatus . UPDATE_INSTALLED ;
255254 } ;
256255
257- if ( ! remotePackage || ( remotePackage . failedInstall && syncOptions . ignoreFailedUpdates ) ) {
256+ const updateShouldBeIgnored = remotePackage && ( remotePackage . failedInstall && syncOptions . ignoreFailedUpdates ) ;
257+ if ( ! remotePackage || updateShouldBeIgnored ) {
258+ if ( updateShouldBeIgnored ) {
259+ log ( "An update is available, but it is being ignored due to having been previously rolled back." ) ;
260+ }
261+
258262 syncStatusChangeCallback ( CodePush . SyncStatus . UP_TO_DATE ) ;
259263 return CodePush . SyncStatus . UP_TO_DATE ;
260264 } else if ( syncOptions . updateDialog ) {
0 commit comments