WebRTC icon indicating copy to clipboard operation
WebRTC copied to clipboard

Library not loaded: @rpath/WebRTC.framework/WebRTC

Open Nahatakyan opened this issue 2 years ago • 16 comments

Hi. I am trying to install a manually downloaded WebRTC. I create an empty project, add xcframework to my Frameworks, Libraries, and Embedded content and just run the empty project. I am getting these errors:

dyld[3164]: Library not loaded: @rpath/WebRTC.framework/WebRTC
  Referenced from: /private/var/containers/Bundle/Application/D226FD5F-C2E7-432E-A62C-8E8B2EC6EA7E/WebRTCTest.app/WebRTC dynamic test
  Reason: tried: '/private/var/containers/Bundle/Application/D226FD5F-C2E7-432E-A62C-8E8B2EC6EA7E/WebRTCTest.app/Frameworks/WebRTC.framework/WebRTC' (no such file), '/private/var/containers/Bundle/Application/D226FD5F-C2E7-432E-A62C-8E8B2EC6EA7E/WebRTCTest.app/Frameworks/WebRTC.framework/WebRTC' (no such file), '/System/Library/Frameworks/WebRTC.framework/WebRTC' (no such file)
Library not loaded: @rpath/WebRTC.framework/WebRTC
  Referenced from: /private/var/containers/Bundle/Application/D226FD5F-C2E7-432E-A62C-8E8B2EC6EA7E/WebRTCTest.app/WebRTCTest
  Reason: tried: '/private/var/containers/Bundle/Application/D226FD5F-C2E7-432E-A62C-8E8B2EC6EA7E/WebRTCTest.app/Frameworks/WebRTC.framework/WebRTC' (no such file), '/private/var/containers/Bundle/Application/D226FD5F-C2E7-432E-A62C-8E8B2EC6EA7E/WebRTCTest.app/Frameworks/WebRTC.framework/WebRTC' (no such file), '/System/Library/Frameworks/WebRTC.framework/WebRTC' (no such file)

Do I need to do something else that's not written in the instructions? Screen Shot 2022-06-14 at 12 28 17

Update. I changed to Embed and sign, and the project works, but when I try to add WebRTC.framework to my framework and it does not work. The same issue

Nahatakyan avatar Jun 14 '22 08:06 Nahatakyan

For me it works with a new iOS project. Can you share your environment? You should consider using SPM as well for easier integration

stasel avatar Jun 22 '22 21:06 stasel

@stasel I have the same issue, but I didn't install manually. You can check the bug in this demo project: https://github.com/Shishani58/WebRTC-bug-demo

With a structure: Swift Package with WebRTC in framework Target, you will get an error: Library not loaded. It might be an SPM bug, but I haven't been able to resolve it.

Shishani58 avatar Jul 08 '22 01:07 Shishani58

Hey @Shishani58 Not sure what is the purpose of the wrapper local package but it seems to cause the issue. If you directly reference the WebRTC-Package in your project it works with no issues on Xcode 13.4.1

stasel avatar Jul 08 '22 08:07 stasel