Miscellaneous
Settings
Declared In
SNRSettings.h
Related To
GeneralSettings
NotificationsSettings
TrackerSettings
InjectorSettings
Inherits From
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
Related To
Inherits From
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
Related To
Inherits From
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 - |
String |
nil | Identifies the app group that your app and its extensions belong to. |
InjectorSettings
Declared In
SNRInjectorSettings.h
Related To
Inherits From
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
Related To
Settings
TrackerAutoTrackingSettings
TrackerDeclarativeTrackingSettings
Inherits From
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
Related To
Inherits From
Declaration
class TrackerDeclarativeTrackingSettings: NSObject
Properties
Property | Type | Default | Description |
---|---|---|---|
enabled | Bool |
true | Specifies if declarative tracking is enabled |
TrackerAutoTrackingSettings
Declared In
SNRTrackerAutoTrackingSettings.h
Related To
Inherits From
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
SNRErrorDomain
.Declared In
SNRError.h
Inherits From
Conforms To
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
SNRErrorDomain
global constant.Declared In
SNRApiError.h
Inherits From
Conforms To
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
Conforms To
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
Conforms To
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
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
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
Related To
Inherits From
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 |
ScreenViewAudience
Declared In
SNRScreenViewAudience.h
Related To
Inherits From
Declaration
class ScreenViewAudience: BaseModel
Properties
Property | Type | Optional | Description |
---|---|---|---|
IDs | [String] |
yes | Audience’s identifiers |
query | String |
yes | Audience’s query |