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

[version:0.6.10+hotfix.1] iOS error: 'WebRTC/WebRTC.h' file not found #713

Closed
aki25 opened this issue Oct 4, 2021 · 37 comments
Closed

[version:0.6.10+hotfix.1] iOS error: 'WebRTC/WebRTC.h' file not found #713

aki25 opened this issue Oct 4, 2021 · 37 comments

Comments

@aki25
Copy link

aki25 commented Oct 4, 2021

When i try to build release on ios (Product -> archive), the build fails with 'WebRTC/WebRTC.h' file not found error.
When i downgrade the dependency to 0.6.7, it works without errors, but i need the changes in the latest version for improved iOS audio handling.
Screen Shot 2021-10-04 at 4 15 20 AM

version that fails: 0.6.10+hotfix.1
version that works: 0.6.7

Oh and another thing that i noticed while running pod update is that flutter_webrtc.podspec still states s.version = '0.2.2' for almost all the versions, it gets confusing sometimes to check if xcode is using the right version dependency or not 😅

@viplifes
Copy link

viplifes commented Oct 4, 2021

We have the same error on 0.6.10+hotfix.1

@sm2017
Copy link

sm2017 commented Oct 4, 2021

I have the same issue when I want to run or build using flutter
But I can run with xcode

@sm2017
Copy link

sm2017 commented Oct 4, 2021

0.6.8 is OK and 0.6.9 introduced the bug

@chao-camect
Copy link

It doesn't work for me in xcode neither. I am using xcode 13.

@alexantropoff
Copy link

WebRTC-SDK doesn't have armv7 support, so just remove armv7 from project's architectures or try to rebuild WebRTC-SDK with armv7 support.

@ycherniavskyi
Copy link
Member

ycherniavskyi commented Oct 8, 2021

I'm just curious, are there any modern smartphones on armv7 architecture?

@cloudwebrtc
Copy link
Member

Starting from iOS 14, only apple devices with arm64 architecture have been supported, and the last armv7 device is iPhone 5/5s

@alexantropoff
Copy link

Starting from iOS 14, only apple devices with arm64 architecture have been supported, and the last armv7 device is iPhone 5/5s

5s is 64bit :-)

@fever365
Copy link

xcode -> pods -> flutter_webrtc and WebrtcSDK -> Build Setttings -> architectures(remove all and + arm64) -> Build Active architectures only (select yes profile and release) -> build ,it's ok

@devplanet-dp
Copy link

Please exclude armv7 from flutter_webrtc, WebRTCSDK, and Project and set Build Active Architectures only to 'YES'. It will work.

@stlr00
Copy link

stlr00 commented Oct 18, 2021

doesnt work on simulators

@sm2017
Copy link

sm2017 commented Oct 23, 2021

@cloudwebrtc I want to support iPhone 5/5s what must I do?

try to rebuild WebRTC-SDK with armv7 support.

@alexantropoff can you explain how?

@superorange
Copy link

当我尝试在 ios 上构建发行版(产品 -> 存档)时,构建失败并显示'WebRTC/WebRTC.h'文件未找到错误。 当我将依赖项降级到 0.6.7 时,它可以正常工作而不会出错,但我需要在最新版本中进行更改以改进 iOS 音频处理。 屏幕截图 2021-10-04 at 4 15 20 AM

失败的0.6.10+hotfix.1 版本:有效的版本:0.6.7

哦,我在运行时注意的另一件事pod update是几乎所有版本flutter_webrtc.podspec仍然存在,有时s.version = '0.2.2'检查 xcode 是否正确使用的版本依赖项会令人困惑😅

Hi,Have you solved this problem?

@allcui
Copy link

allcui commented Oct 29, 2021

Wow this is super annoying. Thanks OP for the post, I downgraded to 0.6.7 and now it's building ios.

@sm2017
Copy link

sm2017 commented Oct 31, 2021

@cloudwebrtc I want to support iPhone 5/5s what must I do?

try to rebuild WebRTC-SDK with armv7 support.

@alexantropoff can you explain how?

@cloudwebrtc Can you help me? I want to support iPhone 5/5s and keep update my flutter-webrtc

@cloudwebrtc
Copy link
Member

cloudwebrtc commented Nov 1, 2021

hey @sm2017 I am trying to use github actions to compile binaries for all platforms. At that time, I will add armv7 to the compilation step. This will solve your issue. If you are in a hurry, you can use the following steps to compile locally

@nambui2000k
Copy link

hey @sm2017 I am trying to use github actions to compile binaries for all platforms. At that time, I will add armv7 to the compilation step. This will solve your issue. If you are in a hurry, you can use the following steps to compile locally

when is it planned?

@stlr00
Copy link

stlr00 commented Nov 24, 2021

Any news?

@santoshakil
Copy link

santoshakil commented Dec 1, 2021

You can fix this issue by doing these following steps:

  1. Delete ios folder
  2. Go to your project directory in terminal and run these commands
  3. flutter create -i objc .
  4. flutter clean && flutter pub get
  5. cd ios
  6. arch -x86_64 pod update
  7. arch -x86_64 pod install
  8. then at the top of your Pod file, paste this line platform :ios, '10.0'
  9. right click on ios folder and open in xcode and then set all deployment target to 10

IMPORTANT: I think webrtc is not working on IOS simulator. I'm not sure. Your can run on real device.

@aytunch
Copy link

aytunch commented Dec 1, 2021

With the suggested workarounds it works in real device but there is no way to run it in iOS simulators.

Do you have any suggestions for that?
There are a lot of packages which depend on WebRTC please fix this issue.

@http600
Copy link

http600 commented Dec 4, 2021

I fixed this issue by doing these following steps:

  1. Delete ios folder
  2. Go to your project directory in terminal and run these commands
  3. flutter create -i objc .
  4. flutter clean && flutter pub get
  5. cd ios
  6. arch -x86_64 pod update
  7. arch -x86_64 pod install
  8. then at the top of your Pod file, paste this line platform :ios, '10.0'
  9. right click on ios folder and open in xcode and then set all deployment target to 10

IMPORTANT: I think webrtc is not working on IOS simulator. I'm not sure. Your can run on real device.

It looks nice to me, would you mind to explain what it does, and why it works, It's better to know the consequence before typing those command to me, thanks.

@aytunch
Copy link

aytunch commented Dec 4, 2021

@http600 does it work with iOS simulator also?
And can we make it run with armv7 devices using latest WebRTC? (iphone5 and 5s)

@sm2017
Copy link

sm2017 commented Dec 5, 2021

@cloudwebrtc Did you know why I get the error while I'm run application via android studio for iOS but not in xcode?

@http600
Copy link

http600 commented Dec 6, 2021

@http600 does it work with iOS simulator also? And can we make it run with armv7 devices using latest WebRTC? (iphone5 and 5s)

I'm still trying

@codingride
Copy link

I've been trying all day to make this work until I found my workaround. My solution works fine with until this day.
I've added these few lines in my podfile and worked for me so far in the simulator. Not sure if there other problems on the way but at least I was able to run the simulator.

This is how my podfile look at the end of it:
Screen Shot 2021-12-25 at 9 26 25 PM

@ShahanAhmedDev
Copy link

I've been trying all day to make this work until I found my workaround. My solution works fine with until this day. I've added these few lines in my podfile and worked for me so far in the simulator. Not sure if there other problems on the way but at least I was able to run the simulator.

This is how my podfile look at the end of it: Screen Shot 2021-12-25 at 9 26 25 PM

Thank you! that did the trick for me.

@Adrian1110
Copy link

Adrian1110 commented Jan 14, 2022

I've been trying all day to make this work until I found my workaround. My solution works fine with until this day. I've added these few lines in my podfile and worked for me so far in the simulator. Not sure if there other problems on the way but at least I was able to run the simulator.

This is how my podfile look at the end of it: Screen Shot 2021-12-25 at 9 26 25 PM

Yes, it's working and if you are too lazy to copy from the picture:

`

post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
config.build_settings['IPHONE_DEPLOYMENT_TARGET']='10.0'
config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulators*]']='arm64'
config.build_settings['ONLY_ACTIVE_ARCH']='YES'
end
end
end

`

@mafreud
Copy link

mafreud commented Feb 2, 2022

worked fine on my physical device.
Any progress?

@ShahanAhmedDev
Copy link

For the time being it's only working in physical devices but not in (IOS) emulators.

@mafreud
Copy link

mafreud commented Feb 2, 2022

@ShahanAhmedDev ok😊

@carman247
Copy link

This still causes a problem running on simulators on version 0.8.0.

@carman247
Copy link

Seems like able to run on simulator using XCode... No changes needed. Very strange

@pro100andrey
Copy link

Any updates ?

@cloudwebrtc
Copy link
Member

You can try the latest version 0.8.3

@simonbengtsson
Copy link

The only thing that does not work for me with the latest version 0.8.5 is installing on iOS simulator. After setting ONLY_ACTIVE_ARCH as suggested above it works though.

Complete post_install hook for reference:

# ./ios/Podfile
post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
  end
  
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|

      # https://github.com/flutter-webrtc/flutter-webrtc/issues/713
      if target.name == "flutter_webrtc" || target.name == "WebRTC-SDK"
        config.build_settings['ONLY_ACTIVE_ARCH'] = 'YES'
      end
    end
  end
end

@simonbengtsson
Copy link

Verified that the above post_install hook (ONLY_ACTIVE_ARCH = YES) is still needed for builds to succeed on iOS simulators using flutter 3.0.1 stable and flutter-webrtc 0.8.7.

@ycherniavskyi
Copy link
Member

Let's assume that the issue is resolved. Fore more info/discussion welcome to released Q&A - #1026.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests