Skip to main content

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 iOS16.0
Xcode15 or newer (any Apple-supported version)
Swift5.9+
Package nameBambuserCalls-shopper
Library productBambuserCallsShopper
Repositoryhttps://github.com/bambuser/BambuserCallsShopperSDK

Add via Swift Package Manager​

Xcode​

  1. File → Add Package Dependencies…
  2. Paste the repository URL:
    https://github.com/bambuser/BambuserCallsShopperSDK
  3. Set the version rule to Up to Next Major starting at 0.5.0.
  4. Add the BambuserCalls-shopper product 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.

note

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​