blackuy / react-native-twilio-video-webrtc

Twilio Video (WebRTC) for React Native
https://www.twilio.com/docs/video
MIT License
606 stars 403 forks source link

TwilioVideo contains bitcode #750

Open anauk opened 6 days ago

anauk commented 6 days ago

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

react-native-twilio-video-webrtc

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

jasonsemkohoag commented 4 days ago

Also have this issue

gastonmorixe commented 3 days ago

@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.

anauk commented 2 days ago

Thank you, thank you very much. It was really helpful 😉

On Sat, 12 Oct 2024 at 20:53, Gaston Morixe @.***> wrote:

@jasonsemkohoag https://github.com/jasonsemkohoag @anauk https://github.com/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 https://developer.apple.com/documentation/xcode-release-notes/xcode-14-release-notes#Deprecations and TwilioVideo iOS SDK version 5.5 https://www.twilio.com/docs/video/changelog-twilio-video-ios-version-5x#550-january-5-2023 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.

— Reply to this email directly, view it on GitHub https://github.com/blackuy/react-native-twilio-video-webrtc/issues/750#issuecomment-2408659802, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKLINDNWTOM6UUCMJVPKJGLZ3FV4BAVCNFSM6AAAAABPUIH5V6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBYGY2TSOBQGI . You are receiving this because you were mentioned.Message ID: @.*** com>