This repository was archived by the owner on May 20, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +15
-5
lines changed
Expand file tree Collapse file tree 4 files changed +15
-5
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,6 +512,10 @@ - (void)savePendingUpdate:(NSString *)packageHash
512512RCT_EXPORT_METHOD (getNewStatusReport:(RCTPromiseResolveBlock)resolve
513513 rejecter:(RCTPromiseRejectBlock)reject)
514514{
515+ if ([_bridge.bundleURL.scheme hasPrefix: @" http" ]) {
516+ resolve (nil );
517+ return ;
518+ }
515519
516520 dispatch_async (dispatch_get_global_queue (DISPATCH_QUEUE_PRIORITY_DEFAULT, 0 ), ^{
517521 if (needToReportRollback) {
@@ -532,7 +536,7 @@ - (void)savePendingUpdate:(NSString *)packageHash
532536 resolve ([CodePushTelemetryManager getUpdateReport: currentPackage]);
533537 return ;
534538 }
535- } else if (isRunningBinaryVersion || [_bridge.bundleURL.scheme hasPrefix: @" http " ] ) {
539+ } else if (isRunningBinaryVersion) {
536540 // Check if the current appVersion has been reported.
537541 NSString *appVersion = [[CodePushConfig current ] appVersion ];
538542 resolve ([CodePushTelemetryManager getBinaryUpdateReport: appVersion]);
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ android {
2222}
2323
2424dependencies {
25- compile fileTree(dir : ' libs' , include : [' *.jar' ])
26- compile ' com.android.support:appcompat-v7:23.0.0 '
27- compile ' com.facebook.react:react-native:0.15.1 '
25+ compile fileTree(dir : " libs" , include : [" *.jar" ])
26+ compile " com.android.support:appcompat-v7:23.0.1 "
27+ compile " com.facebook.react:react-native:0.19.+ "
2828}
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 ( ) ;
You can’t perform that action at this time.
0 commit comments