This repository was archived by the owner on May 20, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +9
-13
lines changed
android/app/src/main/java/com/microsoft/codepush/react Expand file tree Collapse file tree 5 files changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -137,6 +137,11 @@ function log(message) {
137137
138138async function notifyApplicationReady ( ) {
139139 await NativeCodePush . notifyApplicationReady ( ) ;
140+ if ( __DEV__ ) {
141+ // Don't report metrics if in DEV mode.
142+ return ;
143+ }
144+
140145 const statusReport = await NativeCodePush . getNewStatusReport ( ) ;
141146 if ( statusReport ) {
142147 const config = await getConfiguration ( ) ;
Original file line number Diff line number Diff line change @@ -512,10 +512,6 @@ - (void)savePendingUpdate:(NSString *)packageHash
512512RCT_EXPORT_METHOD (getNewStatusReport:(RCTPromiseResolveBlock)resolve
513513 rejecter:(RCTPromiseRejectBlock)reject)
514514{
515- #ifdef DEBUG
516- // Do not report metrics if running in debug mode.
517- resolve (nil );
518- #else
519515 if ([_bridge.bundleURL.scheme hasPrefix: @" http" ]) {
520516 // Do not report metrics if running bundle from packager.
521517 resolve (nil );
@@ -549,7 +545,6 @@ - (void)savePendingUpdate:(NSString *)packageHash
549545
550546 resolve (nil );
551547 });
552- #endif
553548}
554549
555550/*
Original file line number Diff line number Diff line change @@ -426,11 +426,6 @@ protected Void doInBackground(Object... params) {
426426
427427 @ ReactMethod
428428 public void getNewStatusReport (final Promise promise ) {
429- if (isDebugMode ) {
430- // Do not report metrics if running in debug mode.
431- promise .resolve ("" );
432- return ;
433- }
434429
435430 AsyncTask asyncTask = new AsyncTask () {
436431 @ Override
Original file line number Diff line number Diff line change @@ -25,7 +25,8 @@ module.exports = (NativeCodePush) => {
2525 // so that the client knows what the current package version is.
2626 try {
2727 const downloadedPackage = await NativeCodePush . downloadUpdate ( this ) ;
28- reportStatusDownload && reportStatusDownload ( this ) ;
28+ // Don't report metrics if in DEV mode.
29+ ! __DEV__ && reportStatusDownload && reportStatusDownload ( this ) ;
2930 return { ...downloadedPackage , ...local } ;
3031 } finally {
3132 downloadProgressSubscription && downloadProgressSubscription . remove ( ) ;
Original file line number Diff line number Diff line change 11{
22 "name" : " react-native-code-push" ,
3- "version" : " 1.6 .0-beta" ,
3+ "version" : " 1.7 .0-beta" ,
44 "description" : " React Native plugin for the CodePush service" ,
55 "main" : " CodePush.js" ,
66 "homepage" : " https://microsoft.github.io/code-push" ,
2020 "semver" : " ^5.1.0"
2121 },
2222 "devDependencies" : {
23- "react-native" : " 0.15 .0"
23+ "react-native" : " 0.19 .0"
2424 }
2525}
You can’t perform that action at this time.
0 commit comments