Skip to content
Open Screeb

Add the Screeb SDK to your app and start it with your channel id, so surveys, messages and session replay can run.

Install the Screeb SDK once, at the start of your app, with the channel id of your workspace. Until a user is identified, Screeb tracks them as an anonymous visitor: see Identity to attach your own user id.

Your channel id is on the Install page of your workspace settings. The steps on the admin side are in the help center: Install Screeb on your website and Install Screeb in your mobile app.

  • iOS 15.0 or later and Swift 5.9 or later for the iOS SDK. Android API 21 or later, compileSdk 35 and Kotlin 2.1 or later for the Android SDK.
  • Flutter 3.19 or later. Kotlin Multiplatform: Kotlin 2.1.0 or later, Android minSdk 21, iOS 15. .NET MAUI: Android API 24 and iOS 15.
  • The SDK adds about 450 KB to an iOS release app and about 110 KB to an Android one. The iOS SDK has no third-party dependency.
# Podfile
pod "Screeb"
// Package.swift, or File > Add Package Dependencies in Xcode
dependencies: [
.package(url: "https://github.com/ScreebApp/sdk-ios-public", .upToNextMajor(from: "x.x.x"))
]

After you upgrade the SDK, run pod update Screeb in your ios/ directory (or at the root of a native iOS project) to pull the new iOS version.

import Screeb
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
Screeb.initSdk(
context: nil,
channelId: "<YOUR-CHANNEL-ID>"
)
return true
}
}

Start the SDK once, when the app launches. When the user is already logged in at that point, pass their user id and properties too, so Screeb never creates an anonymous visitor for them (see Identity).

When your app uses a SceneDelegate, call it from scene(_:willConnectTo:options:) instead. With the SwiftUI lifecycle, add the AppDelegate above with @UIApplicationDelegateAdaptor.

The SDK needs network access. Audio and video answers, and photos taken from a survey, also need the camera and the microphone.

<!-- Info.plist, only for audio and video answers -->
<key>NSCameraUsageDescription</key>
<string>This app needs access to the camera to record video answers.</string>
<key>NSMicrophoneUsageDescription</key>
<string>This app needs access to the microphone to record audio answers.</string>

On iOS, a video answer asks for both the camera and the microphone, and refusing either one makes it fail. Without these two keys, iOS turns audio and video answers off: respondents never see those buttons. Once a respondent refuses, iOS never asks again, so Screeb hides the buttons. Picking an existing image from the photo library needs no permission.

The Screeb in-app message editor opens your app through a deep link on the screeb-<YOUR-CHANNEL-ID> scheme. Declare the scheme, then forward the links to the SDK.

<!-- Info.plist -->
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>CFBundleURLName</key>
<string>screeb</string>
<key>CFBundleURLSchemes</key>
<array>
<string>screeb-<YOUR-CHANNEL-ID></string>
</array>
</dict>
</array>
import Screeb
// AppDelegate
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any]) -> Bool {
Screeb.handleDeepLink(url: url)
return true
}
// Or SceneDelegate, when your app has one
func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {
Screeb.handleDeepLink(url: URLContexts.first?.url)
}

Stop Screeb at any time, for example when the user withdraws consent. It stays off until you start it again.

Screeb.closeSdk()