Skip to content

Failed to run ios simulator: No such module 'WebRTC' #132

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

Closed
hrxiang opened this issue Jun 28, 2022 · 5 comments
Closed

Failed to run ios simulator: No such module 'WebRTC' #132

hrxiang opened this issue Jun 28, 2022 · 5 comments

Comments

@hrxiang
Copy link

hrxiang commented Jun 28, 2022

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

@hrxiang hrxiang changed the title Failed to run ios simulator Failed to run ios simulator: No such module 'WebRTC' Jun 28, 2022
@zionnite
Copy link

according to the documentation its not expected to run on ios simulator but on real device

@daniloapr
Copy link

daniloapr commented Sep 14, 2022

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

@JasCodes
Copy link
Contributor

JasCodes commented Sep 15, 2022

@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.

@cloudwebrtc
Copy link
Contributor

@JasCodes thanks, I'll look into m1 simulator next week

@cloudwebrtc
Copy link
Contributor

Please upgrade to the latest version of Xcode/Flutter SDK, the example can already work correctly in the simulator (M1)
image

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

5 participants