flutter-webrtc: Building on iOS causes "WebRTC/WebRTC.h file not found" (appearing in 0.9.2, works well in 0.9.1)

Cannot build on iOS with flutter build ipa in 0.9.2. Its working well in 0.9.1 however.

Lexical or Preprocessor Issue (Xcode): 'WebRTC/WebRTC.h' file not found

I’ve tried both with and without the suggested solution in the discussion regarding this error.

Workaround Simply specifying version 0.9.1 in pubspec.yaml works.

Platform information

  • Flutter version: 3.0.5
  • Plugin version: 0.9.2
  • OS: iOS
  • OS version: 15

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 4
  • Comments: 15

Most upvoted comments

Hmm, I am able to build after setting the entire project to arm64 only (removing armv7). Not ideal though since it doesn’t work on simulators.

Screen Shot 2022-08-11 at 11 36 28

The WebRTC.xframework compiled after the m104 release no longer supports iOS arm devices, so need to add the config.build_settings[‘ONLY_ACTIVE_ARCH’] = ‘YES’ to your ios/Podfile in your project

ios/Podfile

post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) target.build_configurations.each do |config| # Workaround for https://github.com/flutter/flutter/issues/64502 config.build_settings[‘ONLY_ACTIVE_ARCH’] = ‘YES’ # <= this line end end end

document webrtc update at version 0.9.2, hope useful for you!