Modules

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 the notification payload is encrypted by Synerise. (Click for more details)

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


Decrypts a notification payload. (Click for more details)

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


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

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


Handles a notification payload with an 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


Client

The module for managing customer account data, registration, authentication, and authorization.

Declared In

SNRClient.h

ClientStateDelegate
ClientRegisterAccountContext
ClientConditionalAuthResult
ClientConditionalAuthenticationContext
ClientAuthenticationContext
ClientOAuthAuthenticationContext
ClientFacebookAuthenticationContext
ClientAppleSignInAuthenticationContext
ClientAccountInformation
ClientUpdateAccountContext
ClientPasswordResetRequestContext
ClientPasswordResetConfirmationContext
Token

Inherits From

NSObject

Declaration

class Client: NSObject

Methods

Sets an object for a customers’s state delegate methods.

static func setClientStateDelegate(_: ClientStateDelegate)


Registers a new customer account. (Click for more details)

static func registerAccount(context: ClientRegisterAccountContext, success: ((Bool) -> Void), failure: ((Error) -> Void))


Confirms a customer’s account. (Click for more details)

static func confirmAccount(token: String, success: ((Bool) -> Void), failure: ((Error) -> Void))


Activates a customer’s account. (Click for more details)

static func activateAccount(email: String, success: ((Bool) -> Void), failure: ((Error) -> Void))


Requests a customer’s account registration process with PIN code. (Click for more details)

static func requestAccountActivationByPin(email: String, success: ((Bool) -> Void), failure: ((ApiError) -> Void)) -> Void


Confirms a customer’s account registration process with PIN code. (Click for more details)

static func confirmAccountActivationByPin(pinCode: String, email: String, success: ((Bool) -> Void), failure: ((ApiError) -> Void)) -> Void


Signs a customer in to obtain a JSON Web Token (JWT). (Click for more details)

static func signIn(email: String, password: String, success: ((Bool) -> Void), failure: ((Error) -> Void))


Signs a customer in conditionally in order to obtain a JSON Web Token (JWT). (Click for more details)

static func signInConditionally(email: String, password: String, success: ((ClientAuthenticationResult) -> Void), failure: ((Error) -> Void))


Signs a customer in with an external token. (Click for more details)

static func authenticate(token: AnyObject, clientIdentityProvider: ClientIdentityProvider, authID: String?, context: ClientAuthenticationContext?, success: ((Bool) -> Void), failure: ((ApiError) -> Void))


Signs a customer in conditionally with an external token. (Click for more details)

static func authenticateConditionally(token: AnyObject, clientIdentityProvider: ClientIdentityProvider, authID: String?, context: ClientConditionalAuthenticationContext?, success: ((ClientAuthenticationResult) -> Void), failure: ((ApiError) -> Void))


DEPRECATED - Signs a customer in with OAuth Access Token. (Click for more details)

static func authenticateByOAuth(accessToken: String, authID: String?, context: ClientOAuthAuthenticationContext?, success: ((Bool) -> Void), failure: ((Error) -> Void))


DEPRECATED - Signs in a registered customer with OAuth Access Token. (Click for more details)

static func authenticateByOAuthIfRegistered(accessToken: String, authID: String?, success: ((Bool) -> Void), failure: ((Error) -> Void))


DEPRECATED - Signs a customer in with Facebook Token. (Click for more details)

static func authenticateByFacebook(facebookToken: String, authID: String?, context: ClientFacebookAuthenticationContext?, success: ((Bool) -> Void), failure: ((Error) -> Void))


DEPRECATED - Signs in a registered customer with Facebook Token. (Click for more details)

static func authenticateByFacebookIfRegistered(facebookToken: String, authID: String?, success: ((Bool) -> Void), failure: ((Error) -> Void))


DEPRECATED - Signs a customer in with Sign In With Apple. (Click for more details)

static func authenticateByAppleSignIn(identityToken: Data, authID: String?, context: ClientAppleSignInAuthenticationContext?, success: ((Bool) -> Void), failure: ((Error) -> Void))


DEPRECATED - Signs in a registered customer with Sign In With Apple. (Click for more details)

static func authenticateByAppleSignInIfRegistered(identityToken: Data, authID: String?, success: ((Bool) -> Void), failure: ((Error) -> Void))


Checks if a customer is signed in (if customer’s token is not expired). (Click for more details)

static func isSignedIn() -> Bool


Signs out a customer. (Click for more details)

static func signOut()


Refreshes the customer’s token. (Click for more details)

static func refreshToken(success: ((Bool) -> Void), failure: ((Error) -> Void))


Retrieves the customer’s token. (Click for more details)

static func retrieveToken(success: ((Token) -> Void), failure: ((Error) -> Void))


Retrieves the customer’s UUID. (Click for more details)

static func getUUID() -> String


Regenerates the customer’s UUID and clears authentication token, login (if applicable), custom email, and custom identifier. (Click for more details)

static func regenerateUUID()


Regenerates the customer’s UUID and clears authentication token, login (if applicable), custom email, and custom identifier. (Click for more details)

static func regenerateUUID(clientIdentifier: String)


Destroys the whole session completely. (Click for more details)

static func destroySession()


Gets a customer’s account information. (Click for more details)

static func getAccount(success: ((ClientAccountInformation) -> Void), failure: ((Error) -> Void))


Retrieves events for an authenticated customer. (Click for more details)

static func getEvents(apiQuery: ClientEventsApiQuery, success: (([ClientEventData]) -> Void), failure: ((Error) -> Void))


Updates a customer’s account information. (Click for more details)

static func updateAccount(context: ClientUpdateAccountContext, success: ((Bool) -> Void), failure: ((Error) -> Void))


Requests a customer’s password reset with email. (Click for more details)

static func requestPasswordReset(context: ClientPasswordResetRequestContext, success: ((Bool) -> Void), failure: ((Error) -> Void))


Confirms a customer’s password reset with a new password and token. (Click for more details)

static func confirmResetPassword(context: ClientPasswordResetConfirmationContext, success: ((Bool) -> Void), failure: ((Error) -> Void))


Changes a customer’s password. (Click for more details)

static func changePassword(password: String, oldPassword: String, success: ((Bool) -> Void), failure: ((Error) -> Void))


DEPRECATED - Requests a customer’s email change.

static func requestEmailChange(email: String, password: String, success: ((Bool) -> Void), failure: ((Error) -> Void))


Requests a customer’s email change. (Click for more details)

static func requestEmailChange(email: String, password: String?, externalToken: AnyObject?, authID: String?, success: ((Bool) -> Void), failure: ((ApiError) -> Void))


DEPRECATED - Requests customer’s email change by Facebook.

static func requestEmailChangeByFacebook(email: String, success: ((Bool) -> Void), failure: ((Error) -> Void))


Confirms a customer’s email change with a token. (Click for more details)

static func confirmEmailChange(token: String, newsletterAgreement: Bool, success: ((Bool) -> Void), failure: ((Error) -> Void))


Requests a customer’s phone update. (Click for more details)

static func requestPhoneUpdate(phone: String, success: ((Bool) -> Void), failure: ((Error) -> Void))


Confirms a customer’s phone update with a code. (Click for more details)

static func confirmPhoneUpdate(phone:confirmationCode: String, smsAgreement: Bool, success: ((Bool) -> Void), failure: ((Error) -> Void))


Deletes a customer’s account information. (Click for more details)

static func deleteAccount(clientAuthFactor: AnyObject, clientIdentityProvider: ClientIdentityProvider, authID: String, success: ((Bool) -> Void), failure: ((Error) -> Void))


DEPRECATED - Deletes a customer’s account information. (Click for more details)

static func deleteAccount(password: String, success: ((Bool) -> Void), failure: ((Error) -> Void))


DEPRECATED - Deletes a customer’s account information by OAuth. (Click for more details)

static func deleteAccountByOAuth(accessToken: String, success: ((Bool) -> Void), failure: ((Error) -> Void))


DEPRECATED - Deletes a customer’s account information by Facebook. (Click for more details)

static func deleteAccountByFacebook(facebookToken: String, success: ((Bool) -> Void), failure: ((Error) -> Void))


DEPRECATED - Deletes a customer’s account information by Sign In With Apple. (Click for more details)

static func deleteAccountByAppleSignIn(identityToken: Data, success: ((Bool) -> Void), failure: ((Error) -> Void))


Recognizes anonymous customer and saves personal information from their database entries. (Click for more details)

static func recognizeAnonymous(email: String?, customIdentify: String?, parameters: [AnyHashable: Any]?)


Registers a customer for Push Notifications. (Click for more details)

static func registerForPush(registrationToken: String, mobilePushAgreement: Bool, success: ((Bool) -> Void), failure: ((Error) -> Void))



Tracker

The module for sending event tracking data to Synerise backend. Tracking is performed by creating pre-defined or custom event objects and sending these to Synerise. It also includes automatic event interception by the Auto-Tracking feature.

Declared In

SNRTracker.h

Event
TrackerParams
TrackerParamsBuilder

Inherits From

NSObject

Declaration

class Tracker: NSObject

Methods

Sets an object for Tracker module delegate methods.

static func setDelegate(_: TrackerDelegate)


Sets the custom identifier for the current customer. The custom identifier will be sent with every event in event params. (Click for more details)

static func setCustomIdentifier(_: String?)


Sets the custom email for the current customer. The custom email will be sent with every event in event params. (Click for more details)

static func setCustomEmail(_: String?)


Adds a new event to the queue and sends available events to the server if possible. (Click for more details)

static func send(_: Event)


Sends events from the queue to the server by force. (Click for more details)

static func flushEvents(completionHandler: (() -> Void)?)



Injector

The module for handling Synerise UI activities such as walkthrough, banner, simple push, and so on.

Declared In

SNRInjector.h

Inherits From

NSObject

Declaration

class Injector: NSObject

Methods

Sets an object for walkthrough delegate methods. (Click for more details)

static func setWalkthroughDelegate(_: InjectorWalkthroughDelegate)


Sets an object for banner delegate methods. (Click for more details)

static func setBannerDelegate(_: InjectorBannerDelegate)


Sets an object for in-app messages delegate methods. (Click for more details)

static func setInAppMessageDelegate(_: InjectorInAppMessageDelegate)


Fetches a walkthrough. (Click for more details)

static func getWalkthrough()


Shows a walkthrough when it is loaded. (Click for more details)

static func showWalkthrough()


Checks if a walkthrough is loaded. (Click for more details)

static func isWalkthroughLoaded() -> Bool


Checks if the walkthrough is unique compared to the previous one. (Click for more details)

static func isLoadedWalkthroughUnique() -> Bool


Fetches Push Notifications set for mobile campaigns. (Click for more details)

static func getPushes(success: (([[AnyHashable: Any]]) -> Void), failure: ((Error) -> Void))


REMOVED - Provides valid banners directly from SDK cache. (Click for more details)

static func getBanners() -> [[AnyHashable: Any]]


REMOVED - Fetches banners set for mobile campaigns and caches the valid ones. (Click for more details)

static func fetchBanners(success: (([[AnyHashable: Any]]) -> Void), failure: ((Error) -> Void))


REMOVED - Shows a banner immediately. (Click for more details)

static func showBanner(_: [AnyHashable: Any], markPresented: Bool)



Promotions

The module for handling promotions and vouchers from Synerise SDK.

Declared In

SNRPromotions.h

PromotionsApiQuery
PromotionIdentifier
PromotionResponse
Promotion
AssignVoucherResponse
VoucherCodesResponse

Inherits From

NSObject

Declaration

class Promotions: NSObject

Methods

Gets all available promotions that are defined for this customer. (Click for more details)

static func getPromotions(success: ((PromotionResponse) -> Void), failure: ((Error) -> Void))


Gets promotions that are defined for parameters provided in the query object. (Click for more details)

static func getPromotions(apiQuery: PromotionsApiQuery, success: ((PromotionResponse) -> Void), failure: ((Error) -> Void))


Gets a promotion identified by UUID. (Click for more details)

static func getPromotion(uuid: String, success: ((Promotion) -> Void), failure: ((Error) -> Void))


Gets a promotion identified by code. (Click for more details)

static func getPromotion(code: String, success: ((Promotion) -> Void), failure: ((Error) -> Void))


Activates a promotion identified by UUID. (Click for more details)

static func activatePromotion(uuid: String, success: ((Bool) -> Void), failure: ((Error) -> Void))


Activates a promotion identified by code. (Click for more details)

static func activatePromotion(code: String, success: ((Bool) -> Void), failure: ((Error) -> Void))


Activates promotions with code or with UUID in a batch. (Click for more details)

static func activatePromotions(identifiers: [PromotionIdentifier], success: ((Bool) -> Void), failure: ((ApiError) -> Void)) -> Void


De-activates a promotion identified by UUID. (Click for more details)

static func deactivatePromotion(uuid: String, success: ((Bool) -> Void), failure: ((Error) -> Void))


De-activates promotion identified by code. (Click for more details)

static func deactivatePromotion(code: String, success: ((Bool) -> Void), failure: ((Error) -> Void))


De-activates promotions with code or with UUID in a batch. (Click for more details)

static func deactivatePromotions(identifiers: [PromotionIdentifier], success: ((Bool) -> Void), failure: ((ApiError) -> Void)) -> Void


Gets a voucher code permanently assigned to a customer (the same code every time). If no code is permanently assigned, the method assigns a voucher from the provided pool so that the same code is returned in all future calls. (Click for more details)

static func getOrAssignVoucher(poolUUID: String, success: ((AssignVoucherResponse) -> Void), failure: ((Error) -> Void))


Assigns a voucher from a pool to a customer. Every request returns different code until the pool is empty. (Click for more details)

static func assignVoucherCode(poolUUID: String, success: ((AssignVoucherResponse) -> Void), failure: ((Error) -> Void))


Gets a customer’s voucher codes. (Click for more details)

static func getAssignedVoucherCodes(success: ((VoucherCodesResponse) -> Void), failure: ((Error) -> Void))



Content

The module for handling content from Synerise backend such as documents, recommendations, and so on.

Declared In

SNRContent.h

RecommendationResponse
Recommendation
DocumentsApiQuery

Inherits From

NSObject

Declaration

class Content: NSObject

Methods

Gets the document that is defined for the provided slug. (Click for more details)

static func getDocument(slug: String, success: (([AnyHashable: Any]) -> Void), failure: ((Error) -> Void))


Gets documents that are defined for parameters provided in the query object. (Click for more details)

static func getDocuments(apiQuery: DocumentsApiQuery, success: (([[AnyHashable: Any]]) -> Void), failure: ((Error) -> Void))


Gets recommendations that are defined for the options provided. (Click for more details)

static func getRecommendations(options: RecommendationOptions, success: ((RecommendationResponse) -> Void), failure: ((Error) -> Void))


Gets the customer’s highest-priority screen view campaign. (Click for more details)

static func getScreenView(success: ((ScreenViewResponse) -> Void), failure: ((ApiError) -> Void))

😕

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