Installation
The iOS Calls-shopper SDK ships as a Swift package. Add it to any Xcode project via Swift Package Manager, declare two Info.plist entries, and you're ready to start a call.
Requirements
| Minimum iOS | 16.0 |
| Xcode | 15 or newer (any Apple-supported version) |
| Swift | 5.9+ |
| Package name | BambuserCalls-shopper |
| Library product | BambuserCallsShopper |
| Repository | https://github.com/bambuser/BambuserCallsShopperSDK |
Add via Swift Package Manager
Xcode
- File → Add Package Dependencies…
- Paste the repository URL:
https://github.com/bambuser/BambuserCallsShopperSDK
- Set the version rule to Up to Next Major starting at
0.5.0. - Add the
BambuserCalls-shopperproduct to your app target.
Package.swift
dependencies: [
.package(
url: "https://github.com/bambuser/BambuserCallsShopperSDK",
from: "0.5.0"
)
],
targets: [
.target(
name: "YourApp",
dependencies: [
.product(name: "BambuserCalls-shopper", package: "BambuserCallsShopperSDK")
]
)
]
Check the latest release on the releases page.
Info.plist
The widget uses the camera and microphone for the video call. iOS requires you to declare usage strings and background modes:
<key>NSCameraUsageDescription</key>
<string>This app uses the camera so you can talk face-to-face with an expert during a one-to-one video call.</string>
<key>NSMicrophoneUsageDescription</key>
<string>This app uses the microphone so you can speak with an expert during a one-to-one video call.</string>
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
</array>
UIBackgroundModes: audio keeps the call audio session alive during brief backgrounding (system dialogs, notifications). Without it, WebRTC audio can suspend and the WebView will stall on stream renegotiation.
The Calls-shopper SDK does not need the -ObjC linker flag.
Import
import BambuserCallsShopper
You now have access to the public API:
BambuserCallController— the object your host code creates and holds.BambuserCallConfiguration— passed to the controller at init.BambuserCallHandlers— data-source closures (product, search, cart).BambuserCallDelegate— fire-and-forget event stream.BambuserCallOverlay— SwiftUI mount point.BambuserCallHostView,BambuserCallWindowPresenter— UIKit mount points.
Verify the setup
Create a controller, log the delegate events, and drop the overlay in your root view. If Xcode compiles and the app launches, the SDK is installed correctly.
import SwiftUI
import BambuserCallsShopper
@main
struct MyApp: App {
@StateObject private var call = BambuserCallController(
configuration: BambuserCallConfiguration(
orgId: "YOUR_ORG_ID",
environment: .us
)
)
var body: some Scene {
WindowGroup {
ZStack {
Text("Ready.")
BambuserCallOverlay(controller: call)
.ignoresSafeArea(edges: .bottom)
}
}
}
}
Next steps
- Architecture — how the SDK layers on top of a single WebView.
- Integration with SwiftUI — wire a full expert-call flow.
- Integration with UIKit — mount inline or on a passthrough window.