2

I've built Flutter app with unity and webrtc following the guide on flutter-unity-view and flutter_webrtc. Android version working fine, but when i try to run ios version the following error occurs (app stuck on white screen with runtime error):

dyld[2229]: Library not loaded: @rpath/webrtc.framework/webrtc
  Referenced from: <8ECDDAEB-2E45-3DF8-A9EC-E9381CE0298B> /private/var/containers/Bundle/Application/73D4E57A-0A29-4364-A56C-F1D14D69DDAA/Runner.app/Frameworks/UnityFramework.framework/UnityFramework
Reason: tried: '/private/var/containers/Bundle/Application/73D4E57A-0A29-4364-A56C-F1D14D69DDAA/Runner.app/Frameworks/webrtc.framework/webrtc' (errno=2), '/usr/lib/swift/webrtc.framework/webrtc' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/webrtc.framework/webrtc' (errno=2), '/usr/lib/swift/webrtc.framework/webrtc' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/webrtc.framework/webrtc' (errno=2),
...etc

Project tree, and error

webrtc lib1 webrtc lib2

Flutter doctor:

[!] Flutter (Channel unknown, 3.7.10, on macOS 13.5 22G74 darwin-x64, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.2)
[✓] VS Code (version 1.79.2)
[✓] Connected device (3 available)
[✓] HTTP Host Availability

Libs: flutter_webrtc: 0.9.23, flutter_unity_widget: ^2022.2.0

Can someone help me? What does "Reason: tried:" mean? How to fix this problem?

apelsinkach
  • 123
  • 1
  • 1
  • 11
  • What version of XCode are you using? Also, see if running an actual iPhone, not a simulator works. – MendelG Aug 07 '23 at 16:11
  • See if https://stackoverflow.com/questions/26024100/dyld-library-not-loaded-rpath-libswiftcore-dylib solves the problem – MendelG Aug 07 '23 at 16:20
  • @MendelG Xcode 14.3.1, used IPhone 8 Plus (not simulator). https://stackoverflow.com/questions/26024100/dyld-library-not-loaded-rpath-libswiftcore-dylib - already tried - same error – apelsinkach Aug 08 '23 at 19:20

1 Answers1

0

Try flowing step

  1. Goto the IOS folder
  2. Delete Pod folder, Podfile, Podfile.lock
  3. Reinstall pod
  4. flutter run again