SDK lifecycle

Initialization


Initializes Synerise SDK.

Declared In

SNRSynerise.h

Method Name

Synerise.initialize(clientApiKey:)

Declaration

func initialize(clientApiKey: String) -> Void

Parameters

Parameter Type Mandatory Default Description
clientApiKey String no - Synerise Client API Key

Return Value

There is no return value.

Examples

let clientApiKey = "YOUR_CLIENT_API_KEY"
Synerise.initialize(clientApiKey: clientApiKey)

Initialize with custom environment


Initializes Synerise SDK with custom environment settings.

Declared In

SNRSynerise.h

Method Name

Synerise.initialize(clientApiKey:baseUrl:)

Declaration

func initialize(clientApiKey: String, baseUrl: String?) -> Void

Parameters

Parameter Type Mandatory Default Description
clientApiKey String no - Synerise Client API Key
baseUrl String no - Synerise API custom environment base URL

Return Value

There is no return value.

Examples

let clientApiKey = "YOUR_CLIENT_API_KEY"
let apiBaseUrl = "YOUR_API_BASE_URL"
Synerise.initialize(clientApiKey: clientApiKey, baseUrl: apiBaseUrl)

Change Client API Key dynamically


Changes Client API Key dynamically.

Declared In

SNRSynerise.h

Method Name

Synerise.changeApiKey(newApiKey)

Declaration

func changeClientApiKey(_ clientApiKey: String) -> Void

Parameters

Parameter Type Mandatory Default Description
clientApiKey String yes - Synerise Client API Key

Return Value

There is no return value.

Set up Debug Mode


Enables/disables console logs from Synerise SDK.

Declared In

SNRSynerise.h

Method Name

Synerise.initialize(clientApiKey:baseUrl:)

Declaration

func setDebugModeEnabled(_ enabled: Bool) -> Void

Parameters

Parameter Type Mandatory Default Description
enabled Bool no - Specifies if console logs are enabled/disabled

Return Value

There is no return value.

😕

We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

😉

Awesome!

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.