diff --git a/.env b/.env index 344ff2fcad..ce7993916d 100644 --- a/.env +++ b/.env @@ -16,3 +16,4 @@ POW_TIME=1 MIXPANEL_TOKEN=3f2e1a8970f159aa2a3d5dc5d65eab38 DEFAULT_NETWORK=testnet_rpc TESTFAIRY_TOKEN=969f6c921cb435cea1d41d1ea3f5b247d6026d55 +INSTABUG_TOKEN=758630ed52864cbad9c5eeeac596c60c diff --git a/.env.e2e b/.env.e2e index a38817e800..77ea595e16 100644 --- a/.env.e2e +++ b/.env.e2e @@ -15,3 +15,4 @@ MIXPANEL_TOKEN=3f2e1a8970f159aa2a3d5dc5d65eab38 POW_TARGET=0.001 POW_TIME=1 DEFAULT_NETWORK=testnet_rpc +INSTABUG_TOKEN=758630ed52864cbad9c5eeeac596c60c \ No newline at end of file diff --git a/.env.jenkins b/.env.jenkins index 5eac748ead..3fd8be436b 100644 --- a/.env.jenkins +++ b/.env.jenkins @@ -16,3 +16,4 @@ TESTFAIRY_TOKEN=969f6c921cb435cea1d41d1ea3f5b247d6026d55 POW_TARGET=0.001 POW_TIME=1 DEFAULT_NETWORK=testnet_rpc +INSTABUG_TOKEN=758630ed52864cbad9c5eeeac596c60c diff --git a/.env.prod b/.env.prod index f9d5ba1844..aec9c18368 100644 --- a/.env.prod +++ b/.env.prod @@ -16,3 +16,4 @@ TESTFAIRY_TOKEN=969f6c921cb435cea1d41d1ea3f5b247d6026d55 POW_TARGET=0.2 POW_TIME=1 DEFAULT_NETWORK=testnet_rpc +INSTABUG_TOKEN=758630ed52864cbad9c5eeeac596c60c diff --git a/android/app/build.gradle b/android/app/build.gradle index 40f99a4b9c..656e179ea9 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -121,7 +121,7 @@ android { defaultConfig { applicationId "im.status.ethereum" minSdkVersion 18 - targetSdkVersion 23 + targetSdkVersion 26 multiDexEnabled true versionCode getVersionCode() versionName getVersionName() @@ -198,7 +198,7 @@ dependencies { implementation project(':react-native-randombytes') implementation project(':realm') implementation fileTree(dir: "libs", include: ["*.jar"]) - implementation "com.android.support:appcompat-v7:23.0.1" + implementation "com.android.support:appcompat-v7:26.1.0" implementation "com.facebook.react:react-native:+" // From node_modules implementation project(':react-native-i18n') implementation project(':react-native-camera') @@ -210,6 +210,7 @@ dependencies { implementation project(':react-native-fcm') implementation 'com.google.firebase:firebase-core:10.0.1' //this decides your firebase SDK version compile project(':react-native-testfairy') + implementation project(':instabug-reactnative') implementation 'status-im:function:0.0.1' implementation fileTree(dir: "node_modules/realm/android/libs", include: ["*.jar"]) 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 4c0bd28243..79411d02f5 100644 --- a/android/app/src/main/java/im/status/ethereum/MainApplication.java +++ b/android/app/src/main/java/im/status/ethereum/MainApplication.java @@ -5,6 +5,7 @@ import com.aakashns.reactnativedialogs.ReactNativeDialogsPackage; import com.bitgo.randombytes.RandomBytesPackage; import org.devio.rn.splashscreen.SplashScreenReactPackage; import com.facebook.react.ReactApplication; +import com.instabug.reactlibrary.RNInstabugReactnativePackage; import com.ocetnik.timer.BackgroundTimerPackage; import com.horcrux.svg.SvgPackage; import com.evollu.react.fcm.FIRMessagingPackage; @@ -15,7 +16,6 @@ import com.facebook.react.shell.MainReactPackage; import com.facebook.soloader.SoLoader; import com.github.alinz.reactnativewebviewbridge.WebViewBridgePackage; import com.AlexanderZaytsev.RNI18n.RNI18nPackage; -import com.instabug.reactlibrary.RNInstabugReactnativePackage; import com.lwansbrough.RCTCamera.RCTCameraPackage; import com.reactnative.ivpusic.imagepicker.PickerPackage; import com.rnfs.RNFSPackage; @@ -72,13 +72,15 @@ public class MainApplication extends MultiDexApplication implements ReactApplica new PickerPackage(), new TestFairyPackage(), new WebViewBridgePackage(BuildConfig.DEBUG, callRPC), - new ReactNativeConfigPackage() + new ReactNativeConfigPackage(), + new RNInstabugReactnativePackage.Builder(BuildConfig.INSTABUG_TOKEN,MainApplication.this) + .setInvocationEvent("shake") + .setPrimaryColor("#1D82DC") + .setFloatingEdge("left") + .setFloatingButtonOffsetFromTop(250) + .build() )); - if (!BuildConfig.DEBUG) { - packages.add(new RNInstabugReactnativePackage("b239f82a9cb00464e4c72cc703e6821e", MainApplication.this, "shake")); - } - return packages; } diff --git a/android/settings.gradle b/android/settings.gradle index 924efd63bb..70168b41d4 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -1,4 +1,6 @@ rootProject.name = 'StatusIm' +include ':instabug-reactnative' +project(':instabug-reactnative').projectDir = new File(rootProject.projectDir, '../node_modules/instabug-reactnative/android') include ':react-native-background-timer' project(':react-native-background-timer').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-background-timer/android') include ':react-native-svg' diff --git a/ios/Podfile b/ios/Podfile index 1d7ece1d93..155b82ff07 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -16,7 +16,6 @@ target 'StatusIm' do # use_frameworks! # Pods for StatusIm - pod 'Instabug', '~> 7.0' pod 'FirebaseMessaging' pod 'React', :path => '../node_modules/react-native' diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 98003a3335..edc17e0cdb 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -18,7 +18,6 @@ PODS: - GoogleToolboxForMac/Defines (= 2.1.1) - GoogleToolboxForMac/NSData+zlib (2.1.1): - GoogleToolboxForMac/Defines (= 2.1.1) - - Instabug (7.2.6) - Protobuf (3.3.0) - React (0.53.3): - React/Core (= 0.53.3) @@ -30,7 +29,6 @@ PODS: DEPENDENCIES: - FirebaseMessaging - - Instabug (~> 7.0) - React (from `../node_modules/react-native`) - react-native-background-timer (from `../node_modules/react-native-background-timer`) - yoga (from `../node_modules/react-native/ReactCommon/yoga`) @@ -49,12 +47,11 @@ SPEC CHECKSUMS: FirebaseInstanceID: 9fbf536668f4d3f0880e7438456dabd1376e294b FirebaseMessaging: 227406c05b0dc9290702d2e9f18ab5528f0c2cf2 GoogleToolboxForMac: 8e329f1b599f2512c6b10676d45736bcc2cbbeb0 - Instabug: 49d4fbf1bf14e2f9074dfb7774ca5611bae993b4 Protobuf: d582fecf68201eac3d79ed61369ef45734394b9c React: fd20e9486c9d994fb6e40d6e67dbd29c7709889c react-native-background-timer: 10063c04bf85d7f8811dff8c74399f0aa715245f yoga: c7c8e64dbc2552b1ceac0b491ff03f5e5128b501 -PODFILE CHECKSUM: 2fb09df3e1ea33a8eef1757e72a6577bd5d547c1 +PODFILE CHECKSUM: 653ad2d673bf8aa8127325a078e07aedc8dbe463 COCOAPODS: 1.3.1 diff --git a/ios/StatusIm.xcodeproj/project.pbxproj b/ios/StatusIm.xcodeproj/project.pbxproj index 4b6aef25db..adccea095c 100644 --- a/ios/StatusIm.xcodeproj/project.pbxproj +++ b/ios/StatusIm.xcodeproj/project.pbxproj @@ -31,14 +31,17 @@ 213311F38CA74CE280FD09AD /* libRNI18n.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 52F6ED6465184513A082652B /* libRNI18n.a */; }; 22118DE1207A419FBFE7B62D /* libRealmReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD48A32459B64E96843BB238 /* libRealmReact.a */; }; 25DC9C9DC25846BD8D084888 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B9A886A2CB448B1ABA0EB62 /* libc++.tbd */; }; + 3A8BF31C42291E324219071C /* InstabugCore.framework in Embed Instabug Framework */ = {isa = PBXBuildFile; fileRef = EA36FD18BC2ECACF0A8B83DE /* InstabugCore.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 3E15DFEC1F6F4D7CAE088F49 /* libTcpSockets.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C2A4E93F6B154AEFA3485B45 /* libTcpSockets.a */; }; 4C16DE0C1F89508700AA10DB /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C16DE0B1F89508700AA10DB /* JavaScriptCore.framework */; }; + 4CA4DA1B206D105D006A98B0 /* libRNInstabug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9E3F1C121DDAE781005E4779 /* libRNInstabug.a */; }; 4FFAE7B0414A463991039A2E /* libRNRandomBytes.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C55F15EB4D4DAF9202A662 /* libRNRandomBytes.a */; }; 5974D2035B8B47E0946B63B6 /* libRNFIRMessaging.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7F752F17B1E04216B1337A72 /* libRNFIRMessaging.a */; }; - 5F8585D411844E5981B94F40 /* libRNInstabug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4EC426A98043452BB6F9C134 /* libRNInstabug.a */; }; + 63AE4174241B852A045FAE1F /* InstabugCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EA36FD18BC2ECACF0A8B83DE /* InstabugCore.framework */; }; 81C6E6AE0AA739BE9D87C1D0 /* libPods-StatusImTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FC1CBCFE6C906043D6CCEEE1 /* libPods-StatusImTests.a */; }; 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; 8E55E6877F950B81C8D711C5 /* libPods-StatusIm.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 101A4045637A2ADF57D28EF5 /* libPods-StatusIm.a */; }; + 91446A820DA5E1C15C24D2A7 /* Instabug.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 22D72275B7ADF9FC3304DCE5 /* Instabug.framework */; }; 925C1F471F7B73B20063DFA0 /* FirebaseCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 925C1F401F7B73B20063DFA0 /* FirebaseCore.framework */; }; 925C1F481F7B73B20063DFA0 /* FirebaseCoreDiagnostics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 925C1F411F7B73B20063DFA0 /* FirebaseCoreDiagnostics.framework */; }; 925C1F491F7B73B20063DFA0 /* FirebaseInstanceID.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 925C1F421F7B73B20063DFA0 /* FirebaseInstanceID.framework */; }; @@ -66,6 +69,7 @@ BA68A2377A20496EA737000D /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 4E586E1B0E544F64AA9F5BD1 /* libz.tbd */; }; C93242561FE1C68C00FE7099 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C93242531FE1C68C00FE7099 /* libRCTAnimation.a */; }; CE4E31B31D8695250033ED64 /* Statusgo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE4E31B21D8695250033ED64 /* Statusgo.framework */; }; + DA0D1ABA19458751CC2840C3 /* Instabug.framework in Embed Instabug Framework */ = {isa = PBXBuildFile; fileRef = 22D72275B7ADF9FC3304DCE5 /* Instabug.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; E0AD9E8F495A4907B65104BF /* libRCTImageResizer.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2BEE3436791D42248F853999 /* libRCTImageResizer.a */; }; F9238D6C1E5F055900C047B9 /* SF-UI-Text-Semibold.otf in Resources */ = {isa = PBXBuildFile; fileRef = F9238D6B1E5F055900C047B9 /* SF-UI-Text-Semibold.otf */; }; FD4F213C3873473CB703B1D2 /* libRNFS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 674B3D9595A047AB8D518F4E /* libRNFS.a */; }; @@ -507,6 +511,18 @@ name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; }; + C5A3444E637B7B715148AD1B /* Embed Instabug Framework */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + DA0D1ABA19458751CC2840C3 /* Instabug.framework in Embed Instabug Framework */, + 3A8BF31C42291E324219071C /* InstabugCore.framework in Embed Instabug Framework */, + ); + name = "Embed Instabug Framework"; + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ @@ -540,6 +556,7 @@ 20A5C96E1D92716C002C4965 /* QBImagePicker.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QBImagePicker.framework; path = "../node_modules/react-native-image-crop-picker/ios/QBImagePicker/build/Debug-iphoneos/QBImagePicker.framework"; sourceTree = ""; }; 20B6B6831D92C42600CC5C6A /* RSKImageCropper.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = RSKImageCropper.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 20B6B6861D92C42600CC5C6A /* QBImagePicker.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = QBImagePicker.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 22D72275B7ADF9FC3304DCE5 /* Instabug.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Instabug.framework; path = "../node_modules/instabug-reactnative/ios/Instabug.framework"; sourceTree = ""; }; 2BEE3436791D42248F853999 /* libRCTImageResizer.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRCTImageResizer.a; sourceTree = ""; }; 305F194186D848FDB07AF34C /* RNFS.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNFS.xcodeproj; path = "../node_modules/react-native-fs/RNFS.xcodeproj"; sourceTree = ""; }; 38A44830EC5708E89387F641 /* Pods-StatusIm.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-StatusIm.release.xcconfig"; path = "Pods/Target Support Files/Pods-StatusIm/Pods-StatusIm.release.xcconfig"; sourceTree = ""; }; @@ -591,6 +608,7 @@ CE4E31B21D8695250033ED64 /* Statusgo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Statusgo.framework; path = "../modules/react-native-status/ios/RCTStatus/Statusgo.framework"; sourceTree = ""; }; D489EE8D5F52DA10AC715727 /* Pods-StatusImTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-StatusImTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-StatusImTests/Pods-StatusImTests.release.xcconfig"; sourceTree = ""; }; DF1CD4C3D1254774ACCAE4E8 /* libBVLinearGradient.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libBVLinearGradient.a; sourceTree = ""; }; + EA36FD18BC2ECACF0A8B83DE /* InstabugCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = InstabugCore.framework; path = "../node_modules/instabug-reactnative/ios/InstabugCore.framework"; sourceTree = ""; }; F090E261B9854867A728CE4F /* RealmReact.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RealmReact.xcodeproj; path = "../node_modules/realm/react-native/ios/RealmReact.xcodeproj"; sourceTree = ""; }; F3548417D8DA4362B6796A54 /* RNInstabug.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNInstabug.xcodeproj; path = "../node_modules/instabug-reactnative/ios/RNInstabug.xcodeproj"; sourceTree = ""; }; F89A8F8005874B86B63C22E3 /* RNFIRMessaging.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNFIRMessaging.xcodeproj; path = "../node_modules/react-native-fcm/ios/RNFIRMessaging.xcodeproj"; sourceTree = ""; }; @@ -611,6 +629,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 4CA4DA1B206D105D006A98B0 /* libRNInstabug.a in Frameworks */, 98482A6F2065257B00263651 /* libReactNativeTestFairy.a in Frameworks */, C93242561FE1C68C00FE7099 /* libRCTAnimation.a in Frameworks */, 4C16DE0C1F89508700AA10DB /* JavaScriptCore.framework in Frameworks */, @@ -649,12 +668,13 @@ BA68A2377A20496EA737000D /* libz.tbd in Frameworks */, 3E15DFEC1F6F4D7CAE088F49 /* libTcpSockets.a in Frameworks */, E0AD9E8F495A4907B65104BF /* libRCTImageResizer.a in Frameworks */, - 5F8585D411844E5981B94F40 /* libRNInstabug.a in Frameworks */, 8E55E6877F950B81C8D711C5 /* libPods-StatusIm.a in Frameworks */, 925C1F491F7B73B20063DFA0 /* FirebaseInstanceID.framework in Frameworks */, 9EF0836B1F3B53AB00876A8F /* libReactNativeConfig.a in Frameworks */, B957A49EB0DE44D9A31CAF2D /* libRNSVG.a in Frameworks */, 5974D2035B8B47E0946B63B6 /* libRNFIRMessaging.a in Frameworks */, + 91446A820DA5E1C15C24D2A7 /* Instabug.framework in Frameworks */, + 63AE4174241B852A045FAE1F /* InstabugCore.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1039,6 +1059,8 @@ 4E586E1B0E544F64AA9F5BD1 /* libz.tbd */, 101A4045637A2ADF57D28EF5 /* libPods-StatusIm.a */, FC1CBCFE6C906043D6CCEEE1 /* libPods-StatusImTests.a */, + 22D72275B7ADF9FC3304DCE5 /* Instabug.framework */, + EA36FD18BC2ECACF0A8B83DE /* InstabugCore.framework */, ); name = Frameworks; sourceTree = ""; @@ -1142,6 +1164,8 @@ 9E71BA90038083A3D24E18E9 /* [CP] Embed Pods Frameworks */, E883D1F9B22B8292CC879292 /* [CP] Copy Pods Resources */, E3914A731DF919ED00EBB515 /* Run Script */, + C5A3444E637B7B715148AD1B /* Embed Instabug Framework */, + D286FF71BA61530E740B7C82 /* Strip Frameworks */, ); buildRules = ( ); @@ -1865,6 +1889,20 @@ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-StatusIm/Pods-StatusIm-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; + D286FF71BA61530E740B7C82 /* Strip Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Strip Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "bash \"${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/InstabugCore.framework/strip-frameworks.sh\"\n"; + }; E3914A731DF919ED00EBB515 /* Run Script */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 8; @@ -2030,6 +2068,7 @@ "$(inherited)", "$(PROJECT_DIR)/Pods/**", "$(PROJECT_DIR)", + "../node_modules/instabug-reactnative/ios", ); GCC_PRECOMPILE_PREFIX_HEADER = NO; GCC_PREFIX_HEADER = ""; @@ -2088,6 +2127,7 @@ "$(inherited)", "$(PROJECT_DIR)/Pods/**", "$(PROJECT_DIR)", + "../node_modules/instabug-reactnative/ios", ); GCC_PRECOMPILE_PREFIX_HEADER = NO; GCC_PREFIX_HEADER = ""; diff --git a/ios/StatusIm/AppDelegate.m b/ios/StatusIm/AppDelegate.m index d6da1c2a43..cd9de5cf71 100644 --- a/ios/StatusIm/AppDelegate.m +++ b/ios/StatusIm/AppDelegate.m @@ -18,8 +18,6 @@ #import "TestFairy.h" #import "RNFIRMessaging.h" -@import Instabug; - @implementation AppDelegate /* Modified version of RCTDefaultLogFunction that also directs all app logs to TestFairy. */ @@ -95,7 +93,6 @@ RCTLogFunction RCTTestFairyLogFunction = ^( self.window.rootViewController = rootViewController; [self.window makeKeyAndVisible]; [SplashScreen show]; - [Instabug startWithToken:@"5534212f4a44f477c9ab270ab5cd2062" invocationEvent:IBGInvocationEventShake]; [FIRApp configure]; [[UNUserNotificationCenter currentNotificationCenter] setDelegate:self]; diff --git a/modules/react-native-status/ios/RCTStatus/RCTStatus.m b/modules/react-native-status/ios/RCTStatus/RCTStatus.m index 386a0e5528..9a4bcaeddd 100644 --- a/modules/react-native-status/ios/RCTStatus/RCTStatus.m +++ b/modules/react-native-status/ios/RCTStatus/RCTStatus.m @@ -3,7 +3,6 @@ #import "React/RCTBridge.h" #import "React/RCTEventDispatcher.h" #import -@import Instabug; @interface NSDictionary (BVJSONString) -(NSString*) bv_jsonStringWithPrettyPrint:(BOOL) prettyPrint; @@ -223,9 +222,7 @@ RCT_EXPORT_METHOD(startNode:(NSString *)configString) { [dict setObject:[NSNumber numberWithInt:511] forKey:NSFilePosixPermissions]; [fileManager createFileAtPath:logUrl.path contents:nil attributes:dict]; } -#ifndef DEBUG - [Instabug addFileAttachmentWithURL:logUrl]; -#endif + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^(void) { diff --git a/modules/react-native-status/ios/RCTStatus/RCTStatus.xcodeproj/project.pbxproj b/modules/react-native-status/ios/RCTStatus/RCTStatus.xcodeproj/project.pbxproj index 9cb56fc1a8..45c09847a5 100644 --- a/modules/react-native-status/ios/RCTStatus/RCTStatus.xcodeproj/project.pbxproj +++ b/modules/react-native-status/ios/RCTStatus/RCTStatus.xcodeproj/project.pbxproj @@ -11,6 +11,7 @@ 206C9F401D474E910063E3E6 /* RCTStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 206C9F3F1D474E910063E3E6 /* RCTStatus.m */; }; 4C0AB2231F8A2ED700CFD175 /* Jail.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C0AB2221F8A2ED700CFD175 /* Jail.m */; }; 4C16DE661F8A171B00AA10DB /* TimerJSExport.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C16DE651F8A171B00AA10DB /* TimerJSExport.m */; }; + 9806BE77206D044D00548CC4 /* Instabug.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9806BE76206D044D00548CC4 /* Instabug.framework */; }; CE4E31B11D86951A0033ED64 /* Statusgo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE4E31B01D86951A0033ED64 /* Statusgo.framework */; }; /* End PBXBuildFile section */ @@ -36,7 +37,7 @@ 4C0AB2221F8A2ED700CFD175 /* Jail.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Jail.m; sourceTree = ""; }; 4C16DE641F8A170500AA10DB /* TimerJSExport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TimerJSExport.h; sourceTree = ""; }; 4C16DE651F8A171B00AA10DB /* TimerJSExport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TimerJSExport.m; sourceTree = ""; }; - 9E3F8AF21ED2CCBD0016D874 /* Instabug.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Instabug.framework; path = ../../../../ios/Pods/Instabug/Instabug.framework; sourceTree = ""; }; + 9806BE76206D044D00548CC4 /* Instabug.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Instabug.framework; path = "../../../../node_modules/instabug-reactnative/ios/Instabug.framework"; sourceTree = ""; }; CE4E31B01D86951A0033ED64 /* Statusgo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Statusgo.framework; sourceTree = ""; }; /* End PBXFileReference section */ @@ -46,6 +47,7 @@ buildActionMask = 2147483647; files = ( CE4E31B11D86951A0033ED64 /* Statusgo.framework in Frameworks */, + 9806BE77206D044D00548CC4 /* Instabug.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -86,7 +88,7 @@ 9E3F8AF11ED2CCBD0016D874 /* Frameworks */ = { isa = PBXGroup; children = ( - 9E3F8AF21ED2CCBD0016D874 /* Instabug.framework */, + 9806BE76206D044D00548CC4 /* Instabug.framework */, ); name = Frameworks; sourceTree = ""; diff --git a/package-lock.json b/package-lock.json index e9f84cb246..e755a09a03 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4657,7 +4657,9 @@ } }, "instabug-reactnative": { - "version": "git+https://github.com/status-im/instabug-reactnative.git#6a39851e93069ff663778c812421e1d7e04a3735" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/instabug-reactnative/-/instabug-reactnative-2.8.1.tgz", + "integrity": "sha512-JhjtevebuOc7hDvfmrHnzutSMY03DuGnYJuX9kmNzd2JtmtlufQ79wU3AwbdOeouPYNwGTWmENJlRApBT4Mo+Q==" }, "invariant": { "version": "2.2.2", diff --git a/package.json b/package.json index ce20b6ffda..faee866352 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "homoglyph-finder": "1.1.1", "https-browserify": "0.0.1", "identicon.js": "github:status-im/identicon.js", - "instabug-reactnative": "git+https://github.com/status-im/instabug-reactnative.git", + "instabug-reactnative": "2.8.1", "level-filesystem": "1.2.0", "nfc-react-native": "github:status-im/nfc-react-native", "os-browserify": "0.1.2", diff --git a/src/status_im/ios/core.cljs b/src/status_im/ios/core.cljs index b19f11f56b..0b406efa76 100644 --- a/src/status_im/ios/core.cljs +++ b/src/status_im/ios/core.cljs @@ -10,6 +10,7 @@ [status-im.ui.components.react :as react] [status-im.utils.notifications :as notifications] [status-im.core :as core] + [status-im.utils.instabug :as instabug] [status-im.utils.snoopy :as snoopy])) (defn app-root [] @@ -42,4 +43,5 @@ (defn init [] (core/init app-root) - (snoopy/subscribe!)) + (snoopy/subscribe!) + (instabug/init)) diff --git a/src/status_im/utils/config.cljs b/src/status_im/utils/config.cljs index bf3bfae684..d1133cc0d6 100644 --- a/src/status_im/utils/config.cljs +++ b/src/status_im/utils/config.cljs @@ -36,6 +36,7 @@ (def mixpanel-token (get-config :MIXPANEL_TOKEN)) (def default-network (get-config :DEFAULT_NETWORK)) (def testfairy-token (get-config :TESTFAIRY_TOKEN)) +(def instabug-token (get-config :INSTABUG_TOKEN)) (def pow-target (js/parseFloat (get-config :POW_TARGET "0.001"))) (def pow-time (js/parseInt (get-config :POW_TIME "1"))) diff --git a/src/status_im/utils/instabug.cljs b/src/status_im/utils/instabug.cljs index 7ca1d5a932..5da105ab75 100644 --- a/src/status_im/utils/instabug.cljs +++ b/src/status_im/utils/instabug.cljs @@ -1,5 +1,6 @@ (ns status-im.utils.instabug (:require [taoensso.timbre :as log] + [status-im.utils.config :as config] [status-im.react-native.js-dependencies :as rn-dependencies])) (defn log [str] @@ -20,3 +21,8 @@ (when-not js/goog.DEBUG (log/merge-config! {:appenders {:instabug (instabug-appender)}})) + +(defn init [] + (.startWithToken rn-dependencies/instabug + config/instabug-token + (.. rn-dependencies/instabug -invocationEvent -shake)))