Failed to run ios simulator: No such module 'WebRTC'
hrxiang opened this issue · 5 comments
Swift Compiler Error (Xcode): No such module 'WebRTC'
/Users/xxxxx/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/livekit_client-1.0.0/ios/Classes/LiveKitPlugin.swift:0:7
Uncategorized (Xcode): Command CompileSwiftSources failed with a nonzero exit code
Could not build the application for the simulator.
Error launching application on iPhone 12 Pro Max.
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.0.1, on macOS 11.3.1 20E241 darwin-arm, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 13.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.2)
[✓] VS Code (version 1.67.2)
[✓] Proxy Configuration
[✓] Connected device (4 available)
[✓] HTTP Host Availability
according to the documentation its not expected to run on ios simulator but on real device
As commented in this docs, you can add this line in your Podspec file. That worked for me:
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
@daniloapr But that for using m1 machine for compilation. The simulator still don't work as per docs. you would need to test on real device.
@davidliu @cloudwebrtc @davidzhao @dsa Any chance in future it will be supported? Useful when one wants to run e2e tests on device farm.
@JasCodes thanks, I'll look into m1 simulator next week