Skip to content

iOS error: 'WebRTC/WebRTC.h' file not found #1026

Discussion options

You must be logged in to vote

Reason

So the reason of this error is actually this warning:

warning: [CP] WebRTC.xcframework: Unable to find matching slice in 'ios-arm64_armv7 ios-arm64_x86_64-simulator' for the current build architectures (arm64 x86_64 i386) and platform (-iphonesimulator).

Solution

Add in file ./ios/Podfile next snippet:

#...
post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
    # snippet begin
    if target.name == "WebRTC-SDK"
      target.build_configurations.each do |build_configuration|
        build_configuration.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = '$(inherited) i386'
      end
    end
    # snip…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@tinhnvc-gadget
Comment options

Answer selected by ycherniavskyi
Comment options

You must be logged in to vote
1 reply
@ycherniavskyi
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants