SDK lifecycle
Initialization
This method initializes Synerise.
Declared In:
lib/main/synerise_initializer.dart
Class:
Synerise
SyneriseInitializer
Builder Parameters:
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
withBaseUrl | String | no | - | Synerise API custom environment base URL |
withClientApiKey | String | yes | - | Synerise Profile (formerly Client) API Key |
withDebugModeEnabled | bool | no | - | Enables or disables console logs |
withCrashHandlingEnabled | bool | no | - | Enables or disables crash handling |
setRequestValidationSalt | String | no | - | Sets salt string for request validation |
Return Value:
No value is returned.
Example:
Synerise.initializer()
.withBaseUrl("YOUR_API_BASE_URL")
.withClientApiKey("YOUR_CLIENT_API_KEY")
.withDebugModeEnabled(false)
.init();
Change Profile API Key dynamically
This method changes a Profile (formerly Client) API key dynamically.
Declared In:
lib/synerise.dart
Class:
Synerise
Declaration:
static Future<void> changeApiKey(String apiKey, [InitializationConfig? config]) async
Parameters:
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
clientApiKey | String | yes | - | Synerise Profile API Key (formerly Client API key) |
config | InitializationConfig | no | - | Object for additional initialization settings after the API key change |
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:
lib/synerise.dart
Class:
Synerise
Declaration:
static Future<void> changeApiKey(String apiKey, [InitializationConfig? config]) async
Parameters:
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
clientApiKey | String | yes | - | Synerise Profile API Key (formerly Client API key) |
config | InitializationConfig | no | - | Object for additional initialization settings after the API key change |
Return Value:
No value is returned.
Set up Debug Mode
This method enables or disables console logs from Synerise SDK.
Declared In:
lib/main/synerise_initializer.dart
Class:
Synerise
Declaration:
.withDebugModeEnabled(bool debugModeEnabled)
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:
lib/main/synerise_initializer.dart
Class:
Synerise
Declaration:
.withCrashHandlingEnabled(bool crashHandlingEnabled)
Parameters:
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
enabled | Bool | yes | - | Enables or disables crash handling |
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:
lib/main/synerise_initializer.dart
Class:
Synerise
Declaration:
.setRequestValidationSalt(String requestValidationSalt)
Parameters:
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
string | String | yes | - | Synerise Profile salt string for request validation |
Return Value:
No value is returned.