@@ -58,6 +58,10 @@ async function checkForUpdate(deploymentKey = null) {
58
58
* client app is resilient to a potential issue with the update check.
59
59
*/
60
60
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
+
61
65
return null ;
62
66
} else {
63
67
const remotePackage = { ...update , ...PackageMixins . remote ( sdk . reportStatusDownload ) } ;
@@ -136,12 +140,7 @@ function log(message) {
136
140
}
137
141
138
142
async 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 ( ) ;
145
144
const statusReport = await NativeCodePush . getNewStatusReport ( ) ;
146
145
if ( statusReport ) {
147
146
const config = await getConfiguration ( ) ;
@@ -254,7 +253,12 @@ async function sync(options = {}, syncStatusChangeCallback, downloadProgressCall
254
253
return CodePush . SyncStatus . UPDATE_INSTALLED ;
255
254
} ;
256
255
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
+
258
262
syncStatusChangeCallback ( CodePush . SyncStatus . UP_TO_DATE ) ;
259
263
return CodePush . SyncStatus . UP_TO_DATE ;
260
264
} else if ( syncOptions . updateDialog ) {
0 commit comments