LiveKit (iOS)
Nativeblocks provides hot-reloading and screen-sharing tools for developers
LiveKit is a powerful debugging and screen-sharing and hot-reloading utility for iOS applications.
Get started
Make sure that your project meets these requirements:
- Uses Swift 5.0 or higher
- Uses SwiftUI for UI development
- Use iOS 15.0 or above
- Initialized Nativeblocks Core SDK
Add LiveKit to your project by updating your Package.swift:
.package(url: "https://github.com/nativeblocks/nativeblocks-wandkit-ios-sdk", from: "1.0.7")
Let's get started by initializing the SDK, it can be inside of the onCreate's Activity or provide via dependency injection, but make sure liveKit calls after the Nativeblocks initialize
Add Required Permissions
Add the following keys to your Info.plist:
- Camera Usage: NSCameraUsageDescription
- Notifications: NSUserNotificationUsageDescription
Provide appropriate descriptions for these permissions to explain why they are required.
import NativeblocksWandkit
NativeblocksManager.getInstance().wandKit(LiveKit())
Debug builds config
Ensure LiveKit is only used in debug builds by wrapping the code with #if DEBUG:
#if DEBUG
NativeblocksManager.getInstance().wandKit(LiveKit())
#endif
Here is how to integrate LiveKit in a SwiftUI app:
import SwiftUI
import Nativeblocks
import NativeblocksWandkit
@main
struct SampleApp: App {
init() {
NativeblocksManager.initialize(
...
)
#if DEBUG
let bundleId = Bundle.main.bundleIdentifier ?? ""
NativeblocksManager.getInstance().wandKit(LiveKit())
#endif
}
...
}