From 6dffa4efc6b298a232d59a9bb25bf3c80178185d Mon Sep 17 00:00:00 2001 From: Godefroy Ponsinet Date: Wed, 21 Aug 2019 11:39:30 +0200 Subject: [PATCH] fix(ios): re-link instabug Signed-off-by: Godefroy Ponsinet --- client/android/app/build.gradle | 1 + .../java/chat/berty/main/MainApplication.java | 1 + client/android/build.gradle | 2 +- client/android/settings.gradle | 2 + client/ios/Berty.xcodeproj/project.pbxproj | 113 ++++++++++-------- client/ios/Podfile | 3 + 6 files changed, 69 insertions(+), 53 deletions(-) diff --git a/client/android/app/build.gradle b/client/android/app/build.gradle index b223d76d0e..284a41ca00 100644 --- a/client/android/app/build.gradle +++ b/client/android/app/build.gradle @@ -248,6 +248,7 @@ android { } dependencies { + implementation project(':instabug-reactnative') implementation project(':lottie-react-native') implementation project(':rn-fetch-blob') implementation project(':react-native-view-shot') diff --git a/client/android/app/src/main/java/chat/berty/main/MainApplication.java b/client/android/app/src/main/java/chat/berty/main/MainApplication.java index ec207f6c2f..4b99cad496 100644 --- a/client/android/app/src/main/java/chat/berty/main/MainApplication.java +++ b/client/android/app/src/main/java/chat/berty/main/MainApplication.java @@ -7,6 +7,7 @@ import com.facebook.hermes.reactexecutor.HermesExecutorFactory; import com.facebook.react.bridge.JavaScriptExecutorFactory; import com.facebook.react.ReactApplication; +import com.instabug.reactlibrary.RNInstabugReactnativePackage; import com.airbnb.android.react.lottie.LottiePackage; import com.facebook.react.ReactNativeHost; diff --git a/client/android/build.gradle b/client/android/build.gradle index 03d93b5c26..120106614d 100644 --- a/client/android/build.gradle +++ b/client/android/build.gradle @@ -36,7 +36,7 @@ allprojects { google() jcenter() - maven { + maven { url "https://sdks.instabug.com/nexus/repository/instabug-cp" } } diff --git a/client/android/settings.gradle b/client/android/settings.gradle index 107b52c211..145158b4bc 100644 --- a/client/android/settings.gradle +++ b/client/android/settings.gradle @@ -1,4 +1,6 @@ rootProject.name = 'Berty' +include ':instabug-reactnative' +project(':instabug-reactnative').projectDir = new File(rootProject.projectDir, '../node_modules/instabug-reactnative/android') include ':lottie-react-native' project(':lottie-react-native').projectDir = new File(rootProject.projectDir, '../node_modules/lottie-react-native/src/android') include ':rn-fetch-blob' diff --git a/client/ios/Berty.xcodeproj/project.pbxproj b/client/ios/Berty.xcodeproj/project.pbxproj index 014c47470b..883584cceb 100644 --- a/client/ios/Berty.xcodeproj/project.pbxproj +++ b/client/ios/Berty.xcodeproj/project.pbxproj @@ -12,6 +12,7 @@ 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; 1DE266E67D81F3D1F8D7D0E7 /* libPods-BertyTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4DEDD478D7FAFBB84D1A8DEF /* libPods-BertyTests.a */; }; + 2097066CF991715213AB431D /* Instabug.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2EED733EB71C6E533DB0DF26 /* Instabug.framework */; }; 2D02E4C21E0B4AEC006451C7 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation.a */; }; 2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */; }; 2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */; }; @@ -22,6 +23,7 @@ 2DF0FFEE2056DD460020B375 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3EA31DF850E9000B6D8A /* libReact.a */; }; 486CFD2A21C8FE9F00E7113B /* Notification.swift in Sources */ = {isa = PBXBuildFile; fileRef = 486CFCF921C8FE9F00E7113B /* Notification.swift */; }; 48E2A93E2177575C005C6F40 /* Logger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48E2A93D2177575C005C6F40 /* Logger.swift */; }; + 769733945ED41A92349F41B2 /* Instabug.framework in Embed Instabug Framework */ = {isa = PBXBuildFile; fileRef = 2EED733EB71C6E533DB0DF26 /* Instabug.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 77A3F1EE7DEB4D6695B03447 /* libPods-Berty-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BC0DC72C388E02C469C54F9 /* libPods-Berty-tvOS.a */; }; 8D1BA426216CF8EA00FEF0AE /* libcrypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D1BA425216CF8EA00FEF0AE /* libcrypto.a */; }; 8D43788B225796230098C024 /* ConnectivityUpdateHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D43788A225796230098C024 /* ConnectivityUpdateHandler.swift */; }; @@ -30,6 +32,7 @@ 990E845C2226DCCB00751E73 /* RCTSwiftLog.m in Sources */ = {isa = PBXBuildFile; fileRef = 990E845B2226DCCB00751E73 /* RCTSwiftLog.m */; }; 998B6ADC2179E1B90029B33C /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 998B6ADB2179E1B90029B33C /* CoreBluetooth.framework */; }; B4DB1353CBB3816CE8622EF6 /* libPods-Berty.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B90BBB97C99313A576609CB5 /* libPods-Berty.a */; }; + EB40D050296022D31CBEBE24 /* Instabug.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 498A0FFB8BFC812C63EBE118 /* Instabug.framework */; }; EC6310FD1D945D73FCECEB85 /* libPods-Berty-tvOSTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1310D1F395AAD06A2FF70EDF /* libPods-Berty-tvOSTests.a */; }; F80F01A522F9B3780012C157 /* fontello.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 991A116D2201B169006F3200 /* fontello.ttf */; }; F8343A9E230AEC94005FB5CB /* libssl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D1BA427216CF8F700FEF0AE /* libssl.a */; }; @@ -330,6 +333,20 @@ }; /* End PBXContainerItemProxy section */ +/* Begin PBXCopyFilesBuildPhase section */ + 9A6F9916F9ED13F4F43CD3AC /* Embed Instabug Framework */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 769733945ED41A92349F41B2 /* Instabug.framework in Embed Instabug Framework */, + ); + name = "Embed Instabug Framework"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + /* Begin PBXFileReference section */ 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; }; 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = ""; }; @@ -357,6 +374,7 @@ 27729C4281337B640FDBA174 /* Pods-Berty-tvOSTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Berty-tvOSTests.release.xcconfig"; path = "Target Support Files/Pods-Berty-tvOSTests/Pods-Berty-tvOSTests.release.xcconfig"; sourceTree = ""; }; 2D02E47B1E0B4A5D006451C7 /* Berty-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Berty-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 2D02E4901E0B4A5D006451C7 /* Berty-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Berty-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; + 2EED733EB71C6E533DB0DF26 /* Instabug.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Instabug.framework; path = "../node_modules/instabug-reactnative/ios/Instabug.framework"; sourceTree = ""; }; 3DA256C3D19CC20E03B06E65 /* Pods-Berty-tvOSTests.adhoc.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Berty-tvOSTests.adhoc.xcconfig"; path = "Target Support Files/Pods-Berty-tvOSTests/Pods-Berty-tvOSTests.adhoc.xcconfig"; sourceTree = ""; }; 3ED3560057DF4AB2B70B81BE /* Ionicons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Ionicons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Ionicons.ttf"; sourceTree = ""; }; 3F440C0C10EB428980A58A68 /* FontAwesome.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = FontAwesome.ttf; path = "../node_modules/react-native-vector-icons/Fonts/FontAwesome.ttf"; sourceTree = ""; }; @@ -364,6 +382,7 @@ 480E37922190872400BE10A5 /* RCTPushNotification.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTPushNotification.xcodeproj; path = "../node_modules/react-native/Libraries/PushNotificationIOS/RCTPushNotification.xcodeproj"; sourceTree = ""; }; 486CFCF921C8FE9F00E7113B /* Notification.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Notification.swift; sourceTree = ""; }; 48E2A93D2177575C005C6F40 /* Logger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Logger.swift; sourceTree = ""; }; + 498A0FFB8BFC812C63EBE118 /* Instabug.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Instabug.framework; path = "../node_modules/instabug-reactnative/ios/Instabug.framework"; sourceTree = ""; }; 4BC0DC72C388E02C469C54F9 /* libPods-Berty-tvOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Berty-tvOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 4DEDD478D7FAFBB84D1A8DEF /* libPods-BertyTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-BertyTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 4F4A5D729E95476D9F40F4D4 /* MaterialIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = MaterialIcons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/MaterialIcons.ttf"; sourceTree = ""; }; @@ -432,6 +451,8 @@ F8343A9E230AEC94005FB5CB /* libssl.a in Frameworks */, 8D1BA426216CF8EA00FEF0AE /* libcrypto.a in Frameworks */, 998B6ADC2179E1B90029B33C /* CoreBluetooth.framework in Frameworks */, + EB40D050296022D31CBEBE24 /* Instabug.framework in Frameworks */, + 2097066CF991715213AB431D /* Instabug.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -578,6 +599,8 @@ 1310D1F395AAD06A2FF70EDF /* libPods-Berty-tvOSTests.a */, 4DEDD478D7FAFBB84D1A8DEF /* libPods-BertyTests.a */, 714FD67800F7498955DF57EE /* Instabug.framework */, + 498A0FFB8BFC812C63EBE118 /* Instabug.framework */, + 2EED733EB71C6E533DB0DF26 /* Instabug.framework */, ); name = Frameworks; sourceTree = ""; @@ -789,11 +812,11 @@ 13B07F8C1A680F5B00A75B9A /* Frameworks */, 13B07F8E1A680F5B00A75B9A /* Resources */, 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, - 5B9D37D9722D7744ABE4E444 /* Strip Frameworks */, 517C1E6BFE9ECAD71119059C /* [CP] Embed Pods Frameworks */, 23DF70C2AB18FB5B36E98855 /* [CP] Copy Pods Resources */, - F0D1801157F17A0E49E3A320 /* Strip Frameworks */, - 5619EB106AB23201612FF42A /* Upload Sourcemap */, + 9A6F9916F9ED13F4F43CD3AC /* Embed Instabug Framework */, + 0442F2771A135DA578D60050 /* Strip Frameworks */, + 86186904C827354AA1AF1BD6 /* Upload Sourcemap */, ); buildRules = ( ); @@ -861,7 +884,7 @@ 13B07F861A680F5B00A75B9A = { DevelopmentTeam = WMBQ84HN4T; LastSwiftMigration = ""; - ProvisioningStyle = Automatic; + ProvisioningStyle = Manual; SystemCapabilities = { com.apple.BackgroundModes = { enabled = 1; @@ -1283,6 +1306,24 @@ shellPath = /bin/sh; shellScript = "export NODE_BINARY=node\nexport EXTRA_PACKAGER_ARGS=\"--entry-file $PROJECT_DIR/../index.js\"\n\necho \"warning: entry file - [$PROJECT_DIR/../index.js]\"\n\U0013\n../node_modules/react-native/scripts/react-native-xcode.sh\n"; }; + 0442F2771A135DA578D60050 /* Strip Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "Strip Frameworks"; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "bash \"${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/Instabug.framework/strip-frameworks.sh\"\n"; + }; 23DF70C2AB18FB5B36E98855 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -1361,7 +1402,7 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Berty/Pods-Berty-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 5619EB106AB23201612FF42A /* Upload Sourcemap */ = { + 66549CEB4E18FEA4176CFB3B /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -1369,35 +1410,21 @@ inputFileListPaths = ( ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); - name = "Upload Sourcemap"; - outputFileListPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 1; - shellPath = /bin/sh; - shellScript = "export INSTABUG_APP_TOKEN=\"YOUR_APP_TOKEN\"\nbash \"../node_modules/instabug-reactnative/ios/upload_sourcemap.sh\"\n"; - }; - 5B9D37D9722D7744ABE4E444 /* Strip Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 8; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - ); - name = "Strip Frameworks"; + name = "[CP] Check Pods Manifest.lock"; outputFileListPaths = ( ); outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Berty-tvOS-checkManifestLockResult.txt", ); - runOnlyForDeploymentPostprocessing = 1; + runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "bash \"${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/Instabug.framework/strip-frameworks.sh\"\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; }; - 66549CEB4E18FEA4176CFB3B /* [CP] Check Pods Manifest.lock */ = { + 86186904C827354AA1AF1BD6 /* Upload Sourcemap */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -1405,19 +1432,15 @@ inputFileListPaths = ( ); inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", ); - name = "[CP] Check Pods Manifest.lock"; + name = "Upload Sourcemap"; outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Berty-tvOS-checkManifestLockResult.txt", ); - runOnlyForDeploymentPostprocessing = 0; + runOnlyForDeploymentPostprocessing = 1; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; + shellScript = "export INSTABUG_APP_TOKEN=\"YOUR_APP_TOKEN\"\nbash \"../node_modules/instabug-reactnative/ios/upload_sourcemap.sh\"\n"; }; 96BF197B3F1B392ABE36815C /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; @@ -1485,24 +1508,6 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - F0D1801157F17A0E49E3A320 /* Strip Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - ); - name = "Strip Frameworks"; - outputFileListPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "bash \"${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/Instabug.framework/strip-frameworks.sh\"\n"; - }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -1655,6 +1660,7 @@ "$(inherited)", "$(SRCROOT)", "$(PROJECT_DIR)", + "../node_modules/instabug-reactnative/ios", ); GCC_INPUT_FILETYPE = sourcecode.c.objc; GCC_NO_COMMON_BLOCKS = YES; @@ -1723,6 +1729,7 @@ "$(inherited)", "$(SRCROOT)", "$(PROJECT_DIR)", + "../node_modules/instabug-reactnative/ios", ); GCC_INPUT_FILETYPE = sourcecode.c.objc; GCC_NO_COMMON_BLOCKS = YES; @@ -1957,6 +1964,7 @@ "$(inherited)", "$(SRCROOT)", "$(PROJECT_DIR)", + "../node_modules/instabug-reactnative/ios", ); GCC_INPUT_FILETYPE = sourcecode.c.objc; GCC_NO_COMMON_BLOCKS = YES; @@ -2152,6 +2160,7 @@ "$(inherited)", "$(SRCROOT)", "$(PROJECT_DIR)", + "../node_modules/instabug-reactnative/ios", ); GCC_INPUT_FILETYPE = sourcecode.c.objc; GCC_NO_COMMON_BLOCKS = YES; diff --git a/client/ios/Podfile b/client/ios/Podfile index c8ec8ee480..7baad978d0 100644 --- a/client/ios/Podfile +++ b/client/ios/Podfile @@ -63,6 +63,9 @@ target 'Berty' do pod 'lottie-react-native', :path => '../node_modules/lottie-react-native' + + pod 'instabug-reactnative', :path => '../node_modules/instabug-reactnative' + target 'BertyTests' do inherit! :search_paths # Pods for testing