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

I’m trying to use the LiveKit SDK in my iOS app. If I include the LiveKitComponents framework in my main app target, it seems to load fine. However, if I include it in either a framework target of my project, or in a separate Swift Package, I get “Library not loaded: @rpath/LiveKitWebRTC.framework/LiveKitWebRTC” when trying to launch.

When using LiveKitComponents (which depends on LiveKitWebRTC) inside a framework target or separate Swift Package, the app must still embed the underlying dynamic frameworks in the final app bundle. The @rpath/LiveKitWebRTC.framework/LiveKitWebRTC error means the WebRTC binary isn’t being embedded in the main app target at runtime.

With Swift Packages and dynamic frameworks, only the top-level app target should handle embedding. Make sure the app target includes the LiveKit and LiveKitWebRTC frameworks under “Frameworks, Libraries, and Embedded Content,” even if they’re declared in a dependent module.

The Swift quickstart outlines the expected iOS integration structure: Swift SDK quickstart.