Miscellaneous

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
}


Errors and Exceptions


SNRError

Note: The default error domain for SDK errors is SNRErrorDomain.

Declared In

SNRError.h

Inherits From

NSError

Conforms To

NSCopying
NSSecureCoding

Declaration

class SNRError: NSError

There are global string constants that can be used to get specific information from the userInfo property:

  • SNRErrorUserInfoCodeKey
  • SNRErrorUserInfoTitleKey
  • SNRErrorUserInfoMessageKey
  • SNRErrorUserInfoFieldKey
  • SNRErrorUserInfoPathKey
  • SNRErrorUserInfoRejectedValueKey
  • SNRErrorUserInfoErrorsKey


SNRApiError

Overview

Note: The default error domain for the SDK errors is the SNRErrorDomain global constant.

Declared In

SNRApiError.h

Inherits From

SNRError

Conforms To

NSCopying NSSecureCoding

Declaration

class SNRApiError: SNRError

Properties

Property Type Optional Description
errors [SNRError] yes List of error items

Initializers

init(domain: String, code: Int, userInfo: [String: Any]?, errors: [SNRError]?)

Methods

Gets the type of an error (SNRApiErrorType).

func getType() -> SNRApiErrorType


Gets the HTTP code of an error.

func getHttpCode() -> Int


Gets the internal code of an error.

func getErrorCode() -> String?


Gets the description of an error.

func getBody() -> String?



SNRApiErrorType

Declared In

SNRApiError.h

Declaration

enum SNRApiErrorType: Int {
	unknown,
	network,
	unauthorizedSession,
	http
}


SNRException

Declared In

SNRException.h

Inherits From

NSException

Conforms To

NSCopying

Declaration

class SNRException: NSException

Properties

Property Type Optional Description
error SNRError no Error provided for Swift compatibility

Methods

Throws an exception.

static func throwException(exceptionName: NSExceptionName, reason: String)



SNRInvalidArgumentException

Declared In

SNRInvalidArgumentException.h

Inherits From

SNRException

Conforms To

NSCopying

Declaration

class SNRInvalidArgumentException: NSException


CacheManager

Declared In

SNRCacheManager.h

Declaration

class CacheManager: NSObject

Methods

static func get(_: AnyClass) -> AnyObject


Misc


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



BaseModel

Declared In

SNRBaseModel.h

Inherits From

NSObject

Declaration

class BaseModel: NSObject


ApiQuerySortingOrder

Declared In

SNRApiQuerySortingOrder.h

Declaration

enum ApiQuerySortingOrder: Int {
	ascending,
	descending
}

Functions

Converts from ApiQuerySortingOrder to String.

func SNR_ApiQuerySortingOrderToString(_: ApiQuerySortingOrder) -> String


Converts from String to ApiQuerySortingOrder.

func SNR_StringToApiQuerySortingOrder(_: String) -> ApiQuerySortingOrder

Note:

The following string constants can be used in API Query objects:

  • SNR_API_QUERY_SORTING_ASC
  • SNR_API_QUERY_SORTING_DESC


ScreenViewResponse

Declared In

SNRScreenViewResponse.h

ScreenViewAudience

Inherits From

BaseModel

Declaration

class ScreenViewResponse: BaseModel

Properties

Property Type Optional Description
audience ScreenViewAudience no Audience of a screen view
identifier String no Screen View’s ID
hashString String no Screen View’s hash
path String no Screen View’s path
name String no Screen View’s name
priority NSNumber no Screen View’s priority
descriptionText String yes Screen View’s description
data AnyObject no Screen View’s data
version String no Version of a screen view
parentVersion String yes Parent version of a screen view
createdAt Date no Screen View’s creation date
updatedAt Date no Screen View’s update date
deletedAt Date yes Screen View’s deletion date
Important: All properties are read-only.


ScreenViewAudience

Declared In

SNRScreenViewAudience.h

ScreenViewResponse

Inherits From

BaseModel

Declaration

class ScreenViewAudience: BaseModel

Properties

Property Type Optional Description
IDs [String] yes Audience’s identifiers
query String yes Audience’s query
Important: All properties are read-only.
😕

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