> *Hi team, I'm integrating LiveKit into my Swi...
# ask-ai
b
Hi team, I'm integrating LiveKit into my SwiftUI app (
sono
) and using the latest version of the client-sdk-ios via SPM.
LiveKit
shows up in my
Package Dependencies
and is embedded in the target
LiveKitWebRTC
also appears in dependencies, but I still get
No such module 'LiveKit'
errors
Clean/build succeeded once, but I think
LiveKitWebRTC.xcframework
is not properly linked or embedded
What’s the correct way to embed LiveKitWebRTC when using the Swift Package? Do I still need to manually add the
.xcframework
from the release ZIP, or should SPM handle it automatically?
Any advice on fixing the
No such module 'LiveKit'
issue in SwiftUI (Xcode 15+) would be greatly appreciated.
t
Thanks for reaching out, David. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
SPM manages the embedding of
LiveKitWebRTC.xcframework
automatically—manual addition from the ZIP is not needed and can cause issues. Here’s a recommended checklist for resolving
No such module 'LiveKit'
despite correct-looking integration: • SPM dependency only: Do not add
LiveKitWebRTC.xcframework
manually. Using the SPM integration—Xcode’s File > Add Packages... with `https://github.com/livekit/client-sdk-swift`—is sufficient. SPM pulls in
LiveKitWebRTC
as a nested dependency automatically. • Clean and rebuild project: Clean build folder, delete derived data, restart Xcode, then rebuild. • Check Frameworks, Libraries, and Embedded Content: In your target settings, verify that LiveKit appears in the Frameworks, Libraries, and Embedded Content section. LiveKitWebRTC does not need a separate manual entry. • Inspect Package.resolved: Confirm that your
Package.resolved
includes both
client-sdk-swift
and
webrtc-xcframework
. • Check Build Phases: Ensure your target’s build phases include LiveKit in _Link Binary with Libraries_; SPM should handle this, but double-checking can reveal misconfiguration. Addressing these points resolves the vast majority of integration issues. If you follow these and still see the error, it likely points to an Xcode package resolution problem or project build configuration issue—not a missing
LiveKitWebRTC
binary. Let me know if you encounter a specific step where the configuration does not match these recommendations, or if a particular error message persists after trying the checklist. Sources: multicam/multicam.xcodeproj/project.pbxproj | LiveKitExample.xcodeproj/project.pbxproj | Package@swift-6.0.swift | Package.swift | Swift & iOS SDK | livekit/livekit_composite | DeepWiki