SDK Lifecycle

Synerise

Declared In

SNRSynerise.h

Inherits From

NSObject

Declaration

class Synerise: NSObject

Properties

Property Type Description
settings Settings Settings module to configure the SDK
Note: The settings property is statically accessible.

Methods

Initializes Synerise SDK. (Click for more details)

static func initialize(clientApiKey:)


Initializes Synerise SDK with custom environment settings. (Click for more details)

static func initialize(clientApiKey:baseUrl:)


Changes Client API Key dynamically. (Click for more details)

static func changeClientApiKey(clientApiKey: String)


Enables/disables console logs from Synerise SDK. (Click for more details)

static func setDebugModeEnabled(_: Bool)


Enables/disables crash handling from Synerise SDK. (Click for more details)

static func setCrashHandlingEnabled(_: Bool)


Sets Synerise SDK host application type. (Click for more details)

static func setHostApplicationType(_: HostApplicationType)


Sets object for Synerise delegate methods.

static func setDelegate(_: SyneriseDelegate)


Checks if a notification’s sender is Synerise. (Click for more details)

static func isSyneriseNotification(_: [AnyHashable: Any]) -> Bool


Checks if a notification’s sender is Synerise and its kind is Simple Push. (Click for more details)

static func isSyneriseSimplePush(_: [AnyHashable: Any]) -> Bool


Checks if a notification’s sender is Synerise and its kind is Banner. (Click for more details)

static func isSyneriseBanner(_: [AnyHashable: Any]) -> Bool


Checks if a notification’s sender is Synerise and its kind is Silent Command. (Click for more details)

static func isSyneriseSilentCommand(_: [AnyHashable: Any]) -> Bool


Checks if a notification’s sender is Synerise and its kind is Silent SDK Command. (Click for more details)

static func isSyneriseSilentSDKCommand(_: [AnyHashable: Any]) -> Bool


Checks if a notification payload is encrypted by Synerise. (Click for more details)

static func isNotificationEncrypted(_: [AnyHashable: Any]) -> Bool


Decrypts notification payload. (Click for more details)

static func decryptNotification(_: [AnyHashable: Any]) -> [AnyHashable: Any]?


Handles notification payload and starts activity. (Click for more details)

static func handleNotification(_: [AnyHashable: Any])


Handles notification payload with action and starts activity. (Click for more details)

static func handleNotification(_: [AnyHashable: Any], actionIdentifier: String)

Note:
  • Synerise Domain is declared as a global string constant - SNRSyneriseDomain
  • Synerise Bundle Identifier is declared as a global string constant - SNRSyneriseBundleIdentifier


SyneriseActivity

Declared In

SNRSynerise.h

Declaration

enum SyneriseActivity: Int {
	simplePush,
	banner,
	walkthrough
}


SyneriseActivityAction

Declared In

SNRSynerise.h

Declaration

enum SyneriseActivityAction: Int {
	none,
	hide
}


HostApplicationType

Declared In

SNRHostApplicationType.h

Declaration

enum HostApplicationType: Int {
	unknown,
	native,
	reactNative,
	flutter,
	xamarin,
	other
}

Functions

Converts from HostApplicationType to String.

func SNR_HostApplicationTypeToString(_: HostApplicationType) -> String


Converts from String to HostApplicationType.

func SNR_StringToHostApplicationType(_: String) -> HostApplicationType



Settings

Declared In

SNRSettings.h

GeneralSettings
NotificationsSettings
TrackerSettings
InjectorSettings

Inherits From

NSObject

Declaration

class Settings: NSObject

Properties

Property Type Description
sdk GeneralSettings General settings
notifications NotificationsSettings Notifications settings
tracker TrackerSettings Tracker module settings
injector InjectorSettings Injector module settings


GeneralSettings

Declared In

SNRGeneralSettings.h

Settings

Inherits From

NSObject

Declaration

class GeneralSettings: NSObject

Properties

Property Type Default Description
enabled Bool true Specifies if all of the SDK functionalities are enabled.
appGroupIdentifier String nil Identifies the app group that your app and its extensions belong to.
keychainGroupIdentifier String nil Identifies the keychain group that your app and its extensions belong to.
minTokenRefreshInterval TimeInterval 1800 Sets a time interval (in seconds) counting down from the expiration time. Within this time, the token will be automatically refreshed by the SDK.
shouldDestroySessionOnApiKeyChange Bool true Specifies if a session should be destroyed after the client API key changes.


NotificationsSettings

Declared In

SNRNotificationsSettings.h

Settings

Inherits From

NSObject

Declaration

class NotificationsSettings: NSObject

Properties

Property Type Default Description
enabled Bool true Specifies if handling notifications by the SDK is enabled.
encryption Bool false Specifies if notifications from Synerise should be encrypted.
disableInAppAlerts Bool false Determines whether the SDK displays an additional alert in the application after receiving a notification.
DEPRECATED - appGroupIdentifier String nil Identifies the app group that your app and its extensions belong to.


InjectorSettings

Declared In

SNRInjectorSettings.h

Settings

Inherits From

NSObject

Declaration

class InjectorSettings: NSObject

Properties

Property Type Default Description
automatic Bool true Specifies if Synerise Mobile Campaigns should be handled automatically


TrackerSettings

Declared In

SNRTrackerSettings.h

Settings
TrackerAutoTrackingSettings
TrackerDeclarativeTrackingSettings

Inherits From

NSObject

Declaration

class TrackerSettings: NSObject

Properties

Property Type Default Description
autoTracking TrackerAutoTrackingSettings - Auto Tracking settings
tracking TrackerDeclarativeTrackingSettings - Declarative Tracking settings
minBatchSize Int 10 Sets the minimum number of events in queue required to send them
maxBatchSize Int 100 Sets the maximum number of events which may be sent in a single batch
autoFlushTimeout TimeInterval 5.0 Sets the time required before the application attempts to send the event queue
locationAutomatic Bool true Specifies if sending location events is automatic


TrackerDeclarativeTrackingSettings

Declared In

SNRTrackerDeclarativeTrackingSettings.h

Settings

Inherits From

NSObject

Declaration

class TrackerDeclarativeTrackingSettings: NSObject

Properties

Property Type Default Description
enabled Bool true Specifies if declarative tracking is enabled


TrackerAutoTrackingSettings

Declared In

SNRTrackerAutoTrackingSettings.h

Settings
TrackerAutoTrackMode

Inherits From

NSObject

Declaration

class TrackerAutoTrackingSettings: NSObject

Properties

Property Type Default Description
enabled Bool .disabled Specifies if AutoTracking is enabled
mode TrackerAutoTrackMode true Sets mode of AutoTracking
excludedClasses [AnyClass] [] Sets views excluded from AutoTracking by class
excludedViewTags [NSNumber] [] Sets views excluded from AutoTracking by tags


TrackerAutoTrackMode

Declared In

SNRTrackerAutoTrackingSettings.h

Declaration

enum TrackerAutoTrackMode: Int {
	eager,
	plain,
	fine,
	disabled
}

😕

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.