flutter-webrtc: [version:0.6.10+hotfix.1] iOS error: 'WebRTC/WebRTC.h' file not found
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.
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 😅
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 13
- Comments: 37 (5 by maintainers)
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:
You can fix this issue by doing these following steps:
flutter create -i objc .
flutter clean && flutter pub get
cd ios
arch -x86_64 pod update
arch -x86_64 pod install
platform :ios, '10.0'
10
IMPORTANT: I think webrtc is not working on IOS simulator. I’m not sure. Your can run on real device.
doesnt work on simulators
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
`
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
Starting from iOS 14, only apple devices with arm64 architecture have been supported, and the last armv7 device is iPhone 5/5s
I have the same issue when I want to run or build using flutter But I can run with xcode
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:
when is it planned?
5s is 64bit 😃
WebRTC-SDK doesn’t have armv7 support, so just remove armv7 from project’s architectures or try to rebuild WebRTC-SDK with armv7 support.
We have the same error on 0.6.10+hotfix.1
For the time being it’s only working in physical devices but not in (IOS) emulators.
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.
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.
Any news?