Settings
The settings module in our SDK allows you to easily set some options directly from your application to change some of SDK behaviors without a need to reinitialize.
This article lists the currently available methods.
General
Enable/disable SDK
Parameter | Compability | Type | Default |
---|---|---|---|
Synerise.Settings.sdk.enabled |
iOS, Android | boolean |
true |
This parameter specifies if the SDK functionalities are enabled.
Set up App Group Identifier
Parameter | Compability | Type | Default |
---|---|---|---|
Synerise.Settings.sdk.appGroupIdentifier |
iOS | string |
null |
This parameter identifies the app group that your application and its extensions belong to.
Synerise SDK needs that configured to store your non-sensitive data and share it between your app and extensions.
Documentation is available at Apple Developer - App Groups.
Set up Keychain Group Identifier
Parameter | Compability | Type | Default |
---|---|---|---|
Synerise.Settings.sdk.keychainGroupIdentifier |
iOS | string |
nil |
This parameter identifies the keychain group used by applications, extensions and services that your app belongs to.
Synerise SDK needs that configured to store your data safely and share it between your app and extensions.
Documentation is available at Apple Developer - Sharing Access to Keychain Items Among a Collection of Apps.
Minimum time interval to refresh token
Parameter | Compability | Type | Default | Minimum Value | Maximum Value |
---|---|---|---|---|---|
Synerise.Settings.sdk.minTokenRefreshInterval |
iOS, Android | number |
1800 | 1800 | - |
This parameter sets a time interval (in seconds) counting backwards from the expiration time. Within this time, the token will be automatically refreshed by the SDK.
Maintaining Client session on different API keys
Parameter | Compability | Type | Default |
---|---|---|---|
Synerise.Settings.sdk.shouldDestroySessionOnApiKeyChange |
iOS, Android | boolean |
true |
This parameter specifies if a session should be destroyed after the client’s API key changes.
This option works only if you change the API key within one workspace
To switch to an API key from a different workspace, use the following method: Client.changeApiKey(clientApiKey:)
.
Notifications
Enable/disable notifications
Parameter | Compability | Type | Default |
---|---|---|---|
Synerise.Settings.notifications.enabled |
iOS, Android | boolean |
true |
This parameter specifies if handling notifications by the SDK is enabled.
Enable/disable In-App notification alerts
Parameter | Compability | Type | Default |
---|---|---|---|
Synerise.Settings.notifications.disableInAppAlerts |
iOS | boolean |
true |
This parameter determines whether the SDK displays an additional alert in the application after receiving a notification.
If you have your own notifications implementation, you can disable In-App notification alerts from the Synerise SDK.
Set up App Group Identifier
Parameter | Compability | Type | Default |
---|---|---|---|
Synerise.Settings.notifications.appGroupIdentifier |
iOS | string |
nil |
This parameter identifies the group that your application and its extensions belong to.
Tracker
Minimum number of events in queue to send
Parameter | Compability | Type | Default | Minimum Value | Maximum Value |
---|---|---|---|---|---|
Synerise.Settings.tracker.minBatchSize |
iOS, Android | number |
10 | 1 | 100 |
This parameter sets a minimum number of events in queue required to send them.
minBatchSize
.Maximum number of events in queue to send
Parameter | Compability | Type | Default | Minimum Value | Maximum Value |
---|---|---|---|---|---|
Synerise.Settings.tracker.maxBatchSize |
iOS, Android | number |
100 | 1 | 100 |
This parameter sets a maximum number of events which may be sent in a single batch.
Timeout to send events automatically
Parameter | Compability | Type | Default | Minimum Value | Maximum Value |
---|---|---|---|---|---|
Synerise.Settings.tracker.autoFlushTimeout |
iOS, Android | number |
5.0 | 0.5 | - |
This parameter sets the time required to elapse before attempting to send the event queue.
Require/do not require backend time synchronization to send events
Parameter | Compability | Type | Default |
---|---|---|---|
Synerise.Settings.tracker.isBackendTimeSyncRequired |
iOS, Android | Bool |
true |
This parameter specifies if events should be sent when server time synchronization has failed.
Injector
Enable/disable automatic starting of Mobile Campaigns
Parameter | Compability | Type | Default |
---|---|---|---|
Synerise.Settings.injector.automatic |
iOS, Android | boolean |
false |
This parameter specifies if Synerise Mobile Campaigns are processed automatically or not.