Lifecycle & Recording

Setup & start recording

Pre API 2.0

let config = Smartlook.SetupConfiguration(key: "YOUR PROJECT KEY")

Smartlook.setupAndStartRecording(configuration: config)

API 2.0

There is no explicit setup() method. The SDK is set up automatically.

Also, recording can be started even though the project key is not set yet. The recorded data will not be sent out till the project key is set but will be stored for the "future" send.

This can be beneficial when the project key is fetched from a server. In this scenario, the recording can be started right away (on the application start). The recording will be complete, the upload of recorded data is just postponed for the moment when the project key is set.

Smartlook.instance.preference.projectKey = "YOUR PROJECT KEY"

Start recording and project key documentation.

Start & stop recording

Pre API 2.0


API 2.0


Start & stop recording documentation.

Check if the SDK is recording

Pre API 2.0


API 2.0

Smartlook.instance.state.status == .recording

Checking if the SDK is recording documentation.

Reset session/user

Pre API 2.0

// Reset session

// Reset session & user
Smartlook.resetSession(resetUser: true)

API 2.0

// Open new session

// Open new session & user

Opening a new session documentation.
Opening a new user documentation.