SDK lifecycle
Initialization
Initializes Synerise SDK.
Declared In
SNRSynerise.h
Class Name
Method Name
initialize(clientApiKey:)
Declaration
static func initialize(clientApiKey: String) -> Void
Parameters
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
clientApiKey | String |
yes | - | 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
Class Name
Method Name
initialize(clientApiKey:baseUrl:)
Declaration
static func initialize(clientApiKey: String, baseUrl: String?) -> Void
Parameters
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
clientApiKey | String |
yes | - | 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
Class Name
Method Name
changeApiKey(newApiKey)
Declaration
static 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 Host Application Type
Sets Synerise SDK host application type.
Declared In
SNRSynerise.h
Class Name
Method Name
setHostApplicationType(_ type: HostApplicationType)
Declaration
static func setHostApplicationType(_ type: HostApplicationType) -> Void
Parameters
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
type | HostApplicationType |
yes | - | Specifies the type of host application |
Return Value
There is no return value.
Set up Debug Mode
Enables/disables console logs from Synerise SDK.
Declared In
SNRSynerise.h
Class Name
Method Name
setDebugModeEnabled(_ enabled:)
Declaration
static func setDebugModeEnabled(_: Bool) -> Void
Parameters
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
enabled | Bool |
yes | - | Enables/disables console logs |
Return Value
There is no return value.
Enable Crash Handling
Enables/Disables crash handling from Synerise SDK.
Declared In
SNRSynerise.h
Class Name
Method Name
setCrashHandlingEnabled(_ enabled:)
Declaration
static func setCrashHandlingEnabled(_: Bool) -> Void
Parameters
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
enabled | Bool |
yes | - | Enables/disables crash handling |
Return Value
There is no return value.