Settings

This article describes options that allow you to change some SDK behaviors. It contains all settings you can configure to change some SDK behaviors. The settings are divided into groups:

  • General - This group contains options related to the general functioning of mobile SDK.
  • Notifications - This group contains options related to push notifications.
  • In-app messaging - This group contains options related to the in-app messages feature.
  • Tracker - This group contains options related to tracking the customer activities in a mobile application.
  • Injector - This group contains options related to displaying campaigns.

Pre-initialization settings

Some of the pre-initialization settings are optional. If you want to use them, they must be configured before Synerise SDK is initialized, before invoking the following methods:

Pre-initialization settings:

The rest of the options can be changed dynamically anytime.

Note:

See advanced initialization example with all settings options for:

General

Enable/disable SDK


This parameter specifies if the SDK is enabled.

Available on: Android, iOS, React Native, Flutter.

Parameter Type Default
Synerise.settings.sdk.enabled Boolean true

Minimum time interval to refresh token


This parameter sets a time interval (in seconds) counting backwards from the expiration time. Within this time, the authorization token will be automatically refreshed by the SDK.

Available on: Android, iOS, React Native, Flutter.

Method Type Default Minimum
Synerise.settings.sdk.setMinTokenRefreshInterval(value) TimeInterval 1800 1800

Maintaining customer session on different API keys


This parameter specifies if a session is destroyed after the Profile API (formerly Client) key changes.

Important: This option must be configured when Synerise SDK is initialized.

Available on: Android, iOS, React Native, Flutter.

Parameter Type Default
Synerise.settings.sdk.shouldDestroySessionOnApiKeyChange Boolean true
Important:

This option works only if you change the Profile (formerly Client) API key within one workspace.

To change the API key from a different workspace, use the following method:

Set up App Group Identifier


This parameter identifies the user default group applications and extensions belong to.

Important: This option must be configured when Synerise SDK is initialized, before invoking the Synerise.initialize(clientApiKey:) method.

Available on: iOS, React Native (iOS), Flutter (iOS).

Parameter Type Default
Synerise.settings.sdk.appGroupIdentifier String nil

Synerise SDK requires this parameter to be configured for storing your non-sensitive data and sharing it between your app and extensions.

Your App Group must be registered on the Apple Developer portal. It is recommended to use reverse-domain name style and prefix it with group. by default. For example, your App Group can be group.com.synerise.sdk.sample.
When your App Group is registered, add it as a capability on the Apple Developer portal in App ID Configuration and in Xcode in the Signing&Capabilities tab.

Documentation is available at Apple Developer - App Groups.

Once configured, you need to set it up in the SDK:

Example

Synerise.settings.sdk.appGroupIdentifier = "group.com.synerise.sdk.sample"

Set up Keychain Group Identifier


This parameter identifies the keychain group used by applications, extensions and services that your app belongs to.

Important: This option must be configured when Synerise SDK is initialized, before invoking the Synerise.initialize(clientApiKey:) method.

Available on: iOS, React Native (iOS), Flutter (iOS).

Parameter Type Default
Synerise.settings.sdk.keychainGroupIdentifier String nil

Synerise SDK requires that parameter to be configured for storing your data safely and sharing it between your app and extensions.

Your Keychain Group Identifier is made of:

  • your Keychain Group
  • your $(AppIdentifierPrefix), also called Team ID.

For example, if your Keychain Group is set to SharedItems and your Team ID is ABC1234DEF, the complete literal that you should set as Keychain Group Identifier is ABC1234DEF.SharedItems.

Documentation is available at Apple Developer - Sharing Access to Keychain Items Among a Collection of Apps.

Once configured, you need to set it up in the SDK:

Example

Synerise.settings.sdk.keychainGroupIdentifier = "ABC1234DEF.SharedItems"

Localize some strings occurring in the SDK


This parameter specifies the localization of some strings occurring in the SDK.

When this option isn’t used, the SDK uses default strings.

Available on: iOS, React Native (iOS), Flutter (iOS).

Parameter Type Default Min. SDK version
Synerise.settings.sdk.localizable [LocalizableStringKey: String] nil 4.14.12
Important: We recommend updating the property when you change the language in the Host App.

Notifications

Enable/disable notifications


This parameter specifies if handling notifications by the SDK is enabled.

Available on: Android, iOS, React Native, Flutter.

Parameter Type Default
Synerise.settings.notifications.enabled Boolean true

Turn on/turn off notification encryption


This parameter specifies if encryption for push notifications is enabled.

Important: This option must be configured when Synerise SDK is initialized.

Available on: Android, iOS, React Native, Flutter.

Method Type Default
Synerise.settings.notifications.setEncryption(value) Boolean false
Important: Encryption must be enabled in the workspace settings, in the Firebase integration section.

Enable/disable notification in-app alerts


This parameter determines whether the SDK displays an additional alert in the application right after a notification is delivered.

If you have your own notification implementation, or you do not want to display alerts with notification content, you should disable in-app notification alerts from the Synerise SDK.

Also, read here.

Available on: iOS, React Native (iOS), Flutter (iOS).

Parameter Type Default
Synerise.settings.notifications.disableInAppAlerts Bool false

In-app messaging

Check Global Control Groups when fetching definitions


This parameter specifies if global control groups should be checked immediately after in-app definitions are fetched.

Available on: Android, iOS, React Native, Flutter.

Parameter Type Default Min. SDK version
Synerise.settings.inAppMessaging.checkGlobalControlGroupsOnDefinitionsFetch Boolean false 5.15.0

Maximum time interval between in-app definition updates


This parameter sets the maximum interval (in seconds) between automatic in-app message definition updates.

Available on: Android, iOS, React Native, Flutter.

Method Type Default Minimum Min. SDK version
Synerise.settings.inAppMessaging.setMaxDefinitionUpdateIntervalLimit(value) TimeInterval 600.0 600.0 4.7.0

Content base URL for in-app message


This parameter defines the base URL for loading external resources (such as JavaScript files, CSS stylesheets, images, or fonts) within your in-app content. This is particularly useful when resources are hosted on your own server and you have set up CORS (Cross-Origin Resource Sharing) policies.

Note: Thanks to the base URL, the app will know where to look for all external resources that are loaded dynamically. This helps avoid specifying full URLs each time a resource is requested and ensures that resources are consistently loaded from the correct location.

Available on: Android, iOS, React Native, Flutter.

Parameter Type Default Min. SDK version
Synerise.settings.inAppMessaging.contentBaseUrl String null 5.21.0

Example

You should set contentBaseUrl to the root URL of the server hosting your resources. This is especially important when hosting assets such as fonts, images, or scripts from a specific domain or server.

Synerise.settings.inAppMessaging.contentBaseUrl = "https://www.synerise.com"

Maximum time for in-app message rendering


This parameter sets a timeout (in seconds) for in-app message rendering.

Available on: Android, iOS, React Native, Flutter.

Parameter Type Default Minimum Min. SDK version
Synerise.settings.inAppMessaging.renderingTimeout TimeInterval 2.0 - 4.7.0

Enable/disable sending inApp.capping event


This parameter specifies if the SDK should send the inApp.capping event.

Available on: Android, iOS, React Native, Flutter.

Parameter Type Default Min. SDK version
Synerise.settings.inAppMessaging.shouldSendInAppCappingEvent Boolean true 5.10.1

Tracker

Enable/disable declarative tracking


This parameter specifies if the declarative tracking feature is enabled.

Available on: Android, iOS.

Parameter Type Default
Synerise.settings.tracker.tracking.enabled Boolean true

Enable/disable auto-tracking


WARNING: Autotracking is NOT available when building apps with Jetpack Compose (Android) and SwiftUI (iOS).

This parameter specifies if the auto-tracking feature is enabled.

Available on: Android, iOS.

Parameter Type Default
Synerise.settings.tracker.autoTracking.enabled Boolean true

Require/do not require backend time synchronization to send events


This parameter specifies if events are sent when the server time synchronization has failed.

Available on: Android, iOS, React Native, Flutter.

Parameter Type Default
Synerise.settings.tracker.isBackendTimeSyncRequired Boolean true

Minimum number of events in queue


This parameter sets the minimum number of events in queue required to send the queue.

Available on: Android, iOS, React Native, Flutter.

Method Type Default Minimum Maximum
Synerise.settings.tracker.setMinimumBatchSize(value) Integer 10 1 100
Note: If the timer runs out, events are sent even if the queue is smaller than defined in minBatchSize.

Maximum number of events in queue


This parameter sets the maximum number of events which may be sent in a single batch.

Available on: Android, iOS, React Native, Flutter.

Method Type Default Minimum Maximum
Synerise.settings.tracker.setMaximumBatchSize(value) Integer 100 1 100

Timeout to send events automatically


This parameter sets the time (in milliseconds for Android, in seconds for other SDKs) required before an attempt is made to send the queue.

Available on: Android, iOS, React Native, Flutter.

Method Type Default Minimum Maximum
Synerise.settings.tracker.setAutoFlushTimeout(value) TimeInterval 5000 50 -
Note: If the minimum queue size is met, events are sent even if the timer has not run out.

Events triggering flush mechanism


This parameter sets an array of event ‘action’ values which trigger the flush mechanism.

Available on: Android, iOS.

Parameter Type Default Min. SDK version
Synerise.settings.tracker.eventsTriggeringFlush List<String> [“push.click”, “push.view”, “push.notView”, “push.button.click”, “push.dismiss”] 5.17.0

Automatic location event sending


This parameter specifies if location events are sent automatically.

Available on: Android, iOS.

Parameter Type Default
Synerise.settings.tracker.locationAutomatic Boolean false

Auto-tracking mode


This parameter parameter defines the auto-tracking mode.

Available on: Android, iOS.

  • PLAIN - listeners are set to track screen visits only.
  • FINE - listeners are attached to nearly everything that is clickable in your app, including screen visits.
Parameter Type Default
Synerise.settings.tracker.autoTracking.trackMode TrackMode FINE

Classes excluded from auto-tracking


This parameter excludes classes from auto-tracking.

Available on: Android, iOS.

Parameter Type Default
Synerise.settings.tracker.autoTracking.excludedClasses List<Object> []

View Tags excluded from auto-tracking


This parameter excludes view tags from auto-tracking.

Available on: iOS.

Parameter Type Default
Synerise.settings.tracker.autoTracking.excludedViewTags [Int] []

Injector

Enable/disable automatic starting of mobile campaigns (deprecated)


This parameter specifies if walkthrough is processed automatically or not. - DEPRECATED

Available on: Android, iOS, React Native, Flutter.

Parameter Type Default
Synerise.settings.injector.automatic Boolean false
😕

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.

Close modal icon Placeholder alt for modal to satisfy link checker