File tree 5 files changed +9
-13
lines changed
android/app/src/main/java/com/microsoft/codepush/react
5 files changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -137,6 +137,11 @@ function log(message) {
137
137
138
138
async function notifyApplicationReady ( ) {
139
139
await NativeCodePush . notifyApplicationReady ( ) ;
140
+ if ( __DEV__ ) {
141
+ // Don't report metrics if in DEV mode.
142
+ return ;
143
+ }
144
+
140
145
const statusReport = await NativeCodePush . getNewStatusReport ( ) ;
141
146
if ( statusReport ) {
142
147
const config = await getConfiguration ( ) ;
Original file line number Diff line number Diff line change @@ -512,10 +512,6 @@ - (void)savePendingUpdate:(NSString *)packageHash
512
512
RCT_EXPORT_METHOD (getNewStatusReport:(RCTPromiseResolveBlock)resolve
513
513
rejecter:(RCTPromiseRejectBlock)reject)
514
514
{
515
- #ifdef DEBUG
516
- // Do not report metrics if running in debug mode.
517
- resolve (nil );
518
- #else
519
515
if ([_bridge.bundleURL.scheme hasPrefix: @" http" ]) {
520
516
// Do not report metrics if running bundle from packager.
521
517
resolve (nil );
@@ -549,7 +545,6 @@ - (void)savePendingUpdate:(NSString *)packageHash
549
545
550
546
resolve (nil );
551
547
});
552
- #endif
553
548
}
554
549
555
550
/*
Original file line number Diff line number Diff line change @@ -426,11 +426,6 @@ protected Void doInBackground(Object... params) {
426
426
427
427
@ ReactMethod
428
428
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
- }
434
429
435
430
AsyncTask asyncTask = new AsyncTask () {
436
431
@ Override
Original file line number Diff line number Diff line change @@ -25,7 +25,8 @@ module.exports = (NativeCodePush) => {
25
25
// so that the client knows what the current package version is.
26
26
try {
27
27
const downloadedPackage = await NativeCodePush . downloadUpdate ( this ) ;
28
- reportStatusDownload && reportStatusDownload ( this ) ;
28
+ // Don't report metrics if in DEV mode.
29
+ ! __DEV__ && reportStatusDownload && reportStatusDownload ( this ) ;
29
30
return { ...downloadedPackage , ...local } ;
30
31
} finally {
31
32
downloadProgressSubscription && downloadProgressSubscription . remove ( ) ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " react-native-code-push" ,
3
- "version" : " 1.6 .0-beta" ,
3
+ "version" : " 1.7 .0-beta" ,
4
4
"description" : " React Native plugin for the CodePush service" ,
5
5
"main" : " CodePush.js" ,
6
6
"homepage" : " https://microsoft.github.io/code-push" ,
20
20
"semver" : " ^5.1.0"
21
21
},
22
22
"devDependencies" : {
23
- "react-native" : " 0.15 .0"
23
+ "react-native" : " 0.19 .0"
24
24
}
25
25
}
You can’t perform that action at this time.
0 commit comments