From 0deca1f874d711cd64ba627ac1f9c21947b9175d Mon Sep 17 00:00:00 2001 From: Roman Volosovskyi Date: Thu, 18 May 2017 13:40:06 +0300 Subject: [PATCH] upgrade instabug --- .../src/main/java/im/status/ethereum/MainApplication.java | 5 +++-- ios/Podfile | 2 +- ios/Podfile.lock | 8 ++++---- ios/StatusIm/AppDelegate.m | 4 ---- src/status_im/ios/core.cljs | 4 +++- src/status_im/utils/instabug.cljs | 6 ++++++ 6 files changed, 17 insertions(+), 12 deletions(-) diff --git a/android/app/src/main/java/im/status/ethereum/MainApplication.java b/android/app/src/main/java/im/status/ethereum/MainApplication.java index 7fb5c50edc..8ef608ec89 100644 --- a/android/app/src/main/java/im/status/ethereum/MainApplication.java +++ b/android/app/src/main/java/im/status/ethereum/MainApplication.java @@ -26,6 +26,7 @@ import im.status.ethereum.module.StatusPackage; import io.realm.react.RealmReactPackage; import me.alwx.HttpServer.HttpServerReactPackage; +import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -39,7 +40,7 @@ public class MainApplication extends Application implements ReactApplication { @Override protected List getPackages() { - List packages = Arrays.asList( + List packages = new ArrayList(Arrays.asList( new MainReactPackage(), new RNNetworkInfoPackage(), new HttpServerReactPackage(), @@ -60,7 +61,7 @@ public class MainApplication extends Application implements ReactApplication { new ImageResizerPackage(), new PickerPackage(), new WebViewBridgePackage(BuildConfig.DEBUG) - ); + )); if (!BuildConfig.DEBUG) { packages.add(new RNInstabugReactnativePackage("b239f82a9cb00464e4c72cc703e6821e", MainApplication.this, "shake")); diff --git a/ios/Podfile b/ios/Podfile index 50b20b7584..32d3be4f0f 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -6,7 +6,7 @@ target 'StatusIm' do # use_frameworks! # Pods for StatusIm - pod 'Instabug', '~> 6.0.0' + pod 'Instabug', '~> 7.0' target 'StatusImTests' do inherit! :search_paths diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 0dc083d449..dffae413c8 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1,12 +1,12 @@ PODS: - - Instabug (6.0.4) + - Instabug (7.2.6) DEPENDENCIES: - - Instabug (~> 6.0.0) + - Instabug (~> 7.0) SPEC CHECKSUMS: - Instabug: 7431c30f6e8883b2e6a9ce4b922ed51cbb25ad19 + Instabug: 49d4fbf1bf14e2f9074dfb7774ca5611bae993b4 -PODFILE CHECKSUM: da0b8d375a7fe107abe5b59bce9340e2fd528084 +PODFILE CHECKSUM: b75d6ec95102ddea68ad1e171f7f8f974533bac7 COCOAPODS: 1.1.1 diff --git a/ios/StatusIm/AppDelegate.m b/ios/StatusIm/AppDelegate.m index a0b4291fc2..aa7c525c47 100644 --- a/ios/StatusIm/AppDelegate.m +++ b/ios/StatusIm/AppDelegate.m @@ -11,7 +11,6 @@ #import "RCTBundleURLProvider.h" #import "RCTRootView.h" -#import #import "SplashScreen.h" @implementation AppDelegate @@ -34,9 +33,6 @@ rootViewController.view = rootView; self.window.rootViewController = rootViewController; [self.window makeKeyAndVisible]; -#ifndef DEBUG - [Instabug startWithToken:@"5534212f4a44f477c9ab270ab5cd2062" invocationEvent:IBGInvocationEventShake]; -#endif [SplashScreen show]; return YES; } diff --git a/src/status_im/ios/core.cljs b/src/status_im/ios/core.cljs index 75d1b09dbf..2becd7b5c1 100644 --- a/src/status_im/ios/core.cljs +++ b/src/status_im/ios/core.cljs @@ -44,7 +44,8 @@ [taoensso.timbre :as log] [status-im.chat.styles.screen :as st] [status-im.profile.qr-code.screen :refer [qr-code-view]] - [status-im.components.status :as status])) + [status-im.components.status :as status] + [status-im.utils.instabug :as instabug])) (defn orientation->keyword [o] (keyword (.toLowerCase o))) @@ -140,6 +141,7 @@ [component])]])]))))}))) (defn init [] + (instabug/init-instabug) (status/call-module status/init-jail) (dispatch-sync [:reset-app]) (dispatch [:listen-to-network-status!]) diff --git a/src/status_im/utils/instabug.cljs b/src/status_im/utils/instabug.cljs index ff53103ba6..dbd920a3b4 100644 --- a/src/status_im/utils/instabug.cljs +++ b/src/status_im/utils/instabug.cljs @@ -3,6 +3,12 @@ (def instabug-rn (js/require "instabug-reactnative")) +(defn init-instabug [] + (when-not js/goog.DEBUG + (.startWithToken instabug-rn + "b239f82a9cb00464e4c72cc703e6821e" + (.. instabug-rn -invocationEvent -shake)))) + (defn log [str] (if js/goog.DEBUG (log/debug str)