diff --git a/ios/scripts/bitcode.sh b/ios/scripts/bitcode.sh new file mode 100755 index 000000000..788a268ae --- /dev/null +++ b/ios/scripts/bitcode.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# This script will download a bitcode build of the WebRTC framework, if needed. + +if [[ ! "$CONFIGURATION" = "Debug" ]]; then + RN_WEBRTC="$SRCROOT/../../node_modules/react-native-webrtc" + + if otool -arch arm64 -l $RN_WEBRTC/ios/WebRTC.framework/WebRTC | grep -q LLVM; then + echo "WebRTC framework has bitcode" + else + echo "WebRTC framework has NO bitcode" + $RN_WEBRTC/tools/downloadBitcode.sh + fi +fi + diff --git a/ios/sdk/sdk.xcodeproj/project.pbxproj b/ios/sdk/sdk.xcodeproj/project.pbxproj index 71b8ed420..8b93ba3e3 100644 --- a/ios/sdk/sdk.xcodeproj/project.pbxproj +++ b/ios/sdk/sdk.xcodeproj/project.pbxproj @@ -270,6 +270,7 @@ buildConfigurationList = 0BD906ED1EC0C00300C8C18E /* Build configuration list for PBXNativeTarget "JitsiMeet" */; buildPhases = ( 26796D8589142D80C8AFDA51 /* [CP] Check Pods Manifest.lock */, + DE3D81D6228B50FB00A6C149 /* Bitcode */, 0BD906E01EC0C00300C8C18E /* Sources */, 0BD906E11EC0C00300C8C18E /* Frameworks */, 0BD906E21EC0C00300C8C18E /* Headers */, @@ -450,6 +451,24 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-JitsiMeet/Pods-JitsiMeet-resources.sh\"\n"; showEnvVarsInLog = 0; }; + DE3D81D6228B50FB00A6C149 /* Bitcode */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = Bitcode; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "../scripts/bitcode.sh\n"; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */