skip to Main Content

My app works on the simulator when I run: npx react-native run-ios

However when I try to get the ipa file by ‘Archive’-ing it via the .xcworkspace
I get the following error regarding WebRTC and bitcode.

How to fix this issue?

ld:
‘/Users/bliss/Library/Developer/Xcode/DerivedData/DanceConnectyCube-czcpkmpwkpsbethjfvbfindeabwg/Build/Intermediates.noindex/ArchiveIntermediates/DanceConnectyCube/BuildProductsPath/Release-iphoneos/XCFrameworkIntermediates/react-native-webrtc/WebRTC.framework/WebRTC’
does not contain bitcode. You must rebuild it with bitcode enabled
(Xcode setting ENABLE_BITCODE), obtain an updated library from the
vendor, or disable bitcode for this target. file
‘/Users/bliss/Library/Developer/Xcode/DerivedData/DanceConnectyCube-czcpkmpwkpsbethjfvbfindeabwg/Build/Intermediates.noindex/ArchiveIntermediates/DanceConnectyCube/BuildProductsPath/Release-iphoneos/XCFrameworkIntermediates/react-native-webrtc/WebRTC.framework/WebRTC’
for architecture arm64 clang: error: linker command failed with exit
code 1 (use -v to see invocation)

2

Answers


  1. you need to remove bitcode in your ios project setting in xcode target->build settings-> enable bitcode or use a custom webrtc build that enable it at compile time (huge build).
    I made one here

    edit:
    a build with bitcode and swiftmodule support
    This Repo also have sh script that explain the procedure.

    Login or Signup to reply.
  2. For those came here with the same error:

    If you are trying to debug your app in your iPhone you have to select bitcode=no in order to work.

    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search