Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TwilioVideo contains bitcode #750

Open
anauk opened this issue Oct 9, 2024 · 5 comments
Open

TwilioVideo contains bitcode #750

anauk opened this issue Oct 9, 2024 · 5 comments
Assignees
Labels
dependencies Pull requests that update a dependency file enhancement
Milestone

Comments

@anauk
Copy link

anauk commented Oct 9, 2024

Steps to reproduce

  1. in Xcode -Product-Archive
  2. Upload in AppStore

Expected behaviour

set up in testflight

Actual behaviour

The following issues occurred while distributing your app: Invalid Executable. ...TwilioVideo' contains bitcode.

Environment

  • Node.js. v18.20.4:
  • React Native version 0.74.3:
  • React Native platform + platform version: iOS 13.0

react-native-twilio-video-webrtc

"react-native-twilio-video-webrtc": "^3.2.1", Installing TwilioVideo (4.6.3)

@jasonsemkohoag
Copy link

Also have this issue

@gastonmorixe
Copy link
Member

@jasonsemkohoag @anauk

This happens because the iOS TwilioVideo framework that the repo uses is an old version - TwilioVideo (4.6.3).

Apple has deprecated bitcode recently since XCode 14 and TwilioVideo iOS SDK version 5.5 has removed the bitcode already.

We are in talks with Twilio about the future of the Programmable Video service and maintainability of this React Native package. We want and may release a new version that will default to their latest version (>= 5.8.2).

In the meantime to make it work using TwilioVideo iOS SDK 4.6.3 you can add the following code to your Podfile:

  # ...

  post_install do |installer|
    # ...

    # Remove Bitcode from TwilioVideo.framework
    bitcode_strip_path = `xcrun --find bitcode_strip`.chop!
    def strip_bitcode_from_framework(bitcode_strip_path, framework_relative_path)
      framework_path = File.join(Dir.pwd, framework_relative_path)
      command = "#{bitcode_strip_path} #{framework_path} -r -o #{framework_path}"
      puts "Stripping bitcode: #{command}"
      system(command)
    end
    framework_paths = [
      "Pods/TwilioVideo/TwilioVideo.xcframework/ios-arm64_armv7/TwilioVideo.framework/TwilioVideo",
    ]

    framework_paths.each do |framework_relative_path|
      strip_bitcode_from_framework(bitcode_strip_path, framework_relative_path)
    end

    # ...
  end

  # ...

Then execute $ pod install and build again.

This should strip the bitcode and validate correctly with Apple.

@gastonmorixe gastonmorixe self-assigned this Oct 12, 2024
@gastonmorixe gastonmorixe removed this from the Next Version milestone Oct 12, 2024
@gastonmorixe gastonmorixe added this to the Next Version milestone Oct 12, 2024
@gastonmorixe gastonmorixe added enhancement dependencies Pull requests that update a dependency file labels Oct 12, 2024
@anauk
Copy link
Author

anauk commented Oct 13, 2024 via email

@sigaits
Copy link

sigaits commented Nov 1, 2024

The script to strip bitcode in the podfile might work if you use bare RN or submit to EAS with local prebuild. But building/submitting through EAS fails at submission with "twilio-video contains bitcode" and I'm not sure how to fix this issue. Expo support hasn't been very helpful so far.

@desc-aman
Copy link

@gastonmorixe thanks, it solved the issue. 😉😉😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file enhancement
Projects
None yet
Development

No branches or pull requests

5 participants