SDK lifecycle
Set Synerise delegate
This method sets an object for Synerise delegate methods.
Declared In:
Headers/SNRSynerise.h
Related To:
SyneriseDelegate
Class:
Synerise
Declaration:
static func setDelegate(_ delegate: SyneriseDelegate)
Discussion:
Learn more about the methods and the purpose of this listener here.
Initialization
This method initializes Synerise.
Declared In:
Headers/SNRSynerise.h
Class:
Synerise
Declaration:
static func initialize(clientApiKey: String) -> Void
Parameters:
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
clientApiKey | String | yes | - | Synerise Profile (formerly Client) API Key |
Return Value:
No value is returned.
Example:
let clientApiKey = "YOUR_CLIENT_API_KEY"
Synerise.initialize(clientApiKey: clientApiKey)
Initialize with custom environment
This method initializes Synerise SDK with custom environment settings.
Declared In:
Headers/SNRSynerise.h
Class:
Synerise
Declaration:
static func initialize(clientApiKey: String, baseUrl: String?) -> Void
Parameters:
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
clientApiKey | String | yes | - | Synerise Profile (formerly Client) API Key |
baseUrl | String | no | - | Synerise API custom environment base URL |
Return Value:
No value is returned.
Example:
let clientApiKey = "YOUR_CLIENT_API_KEY"
let apiBaseUrl = "YOUR_API_BASE_URL"
Synerise.initialize(clientApiKey: clientApiKey, baseUrl: apiBaseUrl)
Change Profile API Key dynamically
This method changes a Profile (formerly Client) API key dynamically.
Declared In:
Headers/SNRSynerise.h
Class:
Synerise
Declaration:
static func changeClientApiKey(_ clientApiKey: String) -> Void
Parameters:
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
clientApiKey | String | yes | - | Synerise Profile API Key (formerly Client API key) |
Return Value:
No value is returned.
Change Profile API Key dynamically with config
This method changes a Profile (formerly Client) API key dynamically, with additional parameters. It can include a salt for Simple Authentication requests.
iOS SDK | Android SDK | React Native SDK | Flutter SDK | |
---|---|---|---|---|
Introduced in: | 4.19.0 | 5.20.0 | 0.23.0 | 1.3.0 |
Declared In:
Headers/SNRSynerise.h
Class:
Synerise
Declaration:
static func changeClientApiKey(_ clientApiKey: String, config: SNRInitializationConfig?) -> Void
Parameters:
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
clientApiKey | String | yes | - | Synerise Profile API Key (formerly Client API key) |
config | SNRInitializationConfig | no | - | Object for additional initialization settings after the API key change |
Return Value:
No value is returned.
Set Request Validation Salt
This method sets the salt string for request validation.
iOS SDK | Android SDK | React Native SDK | Flutter SDK | |
---|---|---|---|---|
Introduced in: | 4.14.0 | 5.7.1 | 0.15.0 | 0.7.0 |
Declared In:
Headers/SNRSynerise.h
Class:
Synerise
Declaration:
static func setRequestValidationSalt(_: String?) -> Void
Parameters:
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
salt | String | no | - | Synerise Profile salt string for request validation |
Return Value:
No value is returned.
Set up host application type
This method sets the Synerise SDK host application type.
iOS SDK | Android SDK | React Native SDK | Flutter SDK | |
---|---|---|---|---|
Introduced in: | 3.6.1 | 3.6.22 | - | - |
Declared In:
Headers/SNRSynerise.h
Class:
Synerise
Declaration:
static func setHostApplicationType(_ type: HostApplicationType) -> Void
Parameters:
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
type | HostApplicationType | yes | - | Specifies the type of host application |
Return Value:
No value is returned.
Set host application SDK plugin version
This method sets the Synerise SDK plugin version.
iOS SDK | Android SDK | React Native SDK | Flutter SDK | |
---|---|---|---|---|
Introduced in: | 4.14.6 | 5.11.0 | - | - |
Declared In:
Headers/SNRSynerise.h
Class:
Synerise
Declaration:
static func setHostApplicationSDKPluginVersion(_ version: String) -> Void
Parameters:
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
version | String | yes | - | Specifies the version of the Synerise SDK plugin in the host application |
Return Value:
No value is returned.
Enable Debug Mode
This method enables or disables console logs from Synerise SDK.
Declared In:
Headers/SNRSynerise.h
Class:
Synerise
Declaration:
static func setDebugModeEnabled(_: Bool) -> Void
Parameters:
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
enabled | Bool | yes | - | Enables or disables console logs |
Return Value:
No value is returned.
Enable Crash Handling
This method enables or disables crash handling by Synerise SDK.
client.applicationCrashed
event with information about crash.Declared In:
Headers/SNRSynerise.h
Class:
Synerise
Declaration:
static func setCrashHandlingEnabled(_: Bool) -> Void
Parameters:
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
enabled | Bool | yes | - | Enables or disables crash handling |
Return Value:
No value is returned.
Set Background Task identifiers
This method sets identifiers for Background Tasks processing.
iOS SDK | Android SDK | React Native SDK | Flutter SDK | |
---|---|---|---|---|
Introduced in: | 4.23.0 | - | - | - |
Declared In:
Headers/SNRSynerise.h
Class:
Synerise
Declaration:
static func setBackgroundTaskIdentifiers(_: [String]) -> Void
Parameters:
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
identifiers | [String] | yes | - | Identifiers for Background Tasks registered in the host appliaction. |
Return Value:
No value is returned.