The SDK is available for iOS (version 12 or newer) as a Swift Package or a CocoaPod library.
6.0.1Import the SportBuff framework in your Swift file:
import SportBuff
Initialize the SDK with your client name:
SportBuff.initialize(clientAccount: <CLIENT_NAME>, anonymousLogin: <BOOL>)
Optional: Login a user manually:
SportBuff.signInUser(token: <TOKEN>) { result in }
SportBuff.signInUserAnonymously { result in }
onSignUp callback:SportBuff.onSignUp = { }
Assigning a closure to onSignUp executes the provided code when the signup button is clicked, enabling custom signup implementation.
CLIENT_NAME is unique per client and provided during onboarding.
anonymousLogin should only be enabled if explicitly set for your account. Set to FALSE unless instructed otherwise.
For backend authentication, see the Backend Authentication Documentation.
The SDK provides a custom BuffView for displaying UI elements over your video view. Add BuffView as shown below:
private let buffView = BuffView()
private func setupUI() {
    buffView.translatesAutoresizingMaskIntoConstraints = false
    view.addSubview(buffView)
    NSLayoutConstraint.activate([
        buffView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
        buffView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
        buffView.topAnchor.constraint(equalTo: view.topAnchor),
        buffView.bottomAnchor.constraint(equalTo: view.bottomAnchor)
    ])
}