Modules

Synerise

Declared In:
Headers/SNRSynerise.h

Inherits From:
NSObject

Declaration:

class Synerise: NSObject
@interface SNRSynerise : NSObject

Properties:

Property Type Description
settings Settings Settings module to configure the SDK

The settings property is statically accessible.

Methods:

This method sets an object for Synerise delegate methods.

static func setDelegate(_: SyneriseDelegate)
+ (void)setDelegate:(nonnull id<SNRSyneriseDelegate>)delegate

(Click for more details)


This method sets an object for notification delegate methods.

static func setNotificationDelegate(_: NotificationDelegate)
+ (void)setNotificationDelegate:(id<SNRNotificationDelegate>)delegate

(Click for more details)


This method initializes Synerise.

static func initialize(apiKey:)
+ (void)initializeWithApiKey:(nonnull NSString *)apiKey

(Click for more details)


This method initializes Synerise SDK with custom environment settings.

static func initialize(apiKey:baseUrl:)
+ (void)initializeWithApiKey:(nonnull NSString *)apiKey andBaseUrl:(nullable NSString *)baseUrl

(Click for more details)


This method sets the salt string for request validation.

static func setRequestValidationSalt(_: String?)
+ (void)setRequestValidationSalt:(nullable NSString *)string

(Click for more details)


This method changes a Profile (formerly Client) API key dynamically.

static func changeApiKey(apiKey: String)
+ (void)changeApiKey:(NSString *)apiKey

(Click for more details)


This method changes a Profile (formerly Client) API key dynamically, with additional parameters.

static func changeApiKey(_ apiKey: String, config: InitializationConfig?) -> Void
(void)changeApiKey:(NSString *)apiKey config:(nullable SNRInitializationConfig *)config;

(Click for more details)


This method sets the Synerise SDK host application type.

static func setHostApplicationType(_: HostApplicationType)
+ (void)setHostApplicationType:(SNRHostApplicationType)type

(Click for more details)


This method sets the Synerise SDK plugin version.

static func setHostApplicationSDKPluginVersion(_: String)
+ (void)setHostApplicationSDKPluginVersion:(NSString *)type

(Click for more details)


This method enables or disables console logs from Synerise SDK.

static func setDebugModeEnabled(_: Bool)
+ (void)setDebugModeEnabled:(BOOL)enabled

(Click for more details)


This method enables or disables crash handling by Synerise SDK.

static func setCrashHandlingEnabled(_: Bool)
+ (void)setCrashHandlingEnabled:(BOOL)enabled

(Click for more details)


This method sets the notification categories (including Synerise categories) that your app supports.

static func setNotificationCategories(_: Set<UNNotificationCategory>)
+ (void)setNotificationCategories:(NSSet<UNNotificationCategory *> *)notificationCategories

(Click for more details)


This method sets identifiers for Background Tasks processing.

static func setBackgroundTaskIdentifiers(_: [String])
+ (void)setBackgroundTaskIdentifiers:(NSArray<NSString *> *)identifiers

(Click for more details)


This method verifies if a notification was sent by Synerise.

static func isSyneriseNotification(_: [AnyHashable: Any]) -> Bool
+ (BOOL)isSyneriseNotification:(nonnull NSDictionary *)userInfo

(Click for more details)


This method verifies if a notification’s sender is Synerise and if the notification is a Simple Push campaign

static func isSyneriseSimplePush(_: [AnyHashable: Any]) -> Bool
+ (BOOL)isSyneriseSimplePush:(nonnull NSDictionary *)userInfo

(Click for more details)


This method verifies if a notification’s sender is Synerise and if the notification is a Banner campaign.

static func isSyneriseBanner(_: [AnyHashable: Any]) -> Bool
+ (BOOL)isSyneriseBanner:(nonnull NSDictionary *)userInfo

(Click for more details) REMOVED in version 5.0.0


This method verifies if a notification's sender is Synerise and if the notification is a Silent Command.

static func isSyneriseSilentCommand(_: [AnyHashable: Any]) -> Bool
+ (BOOL)isSyneriseSilentCommand:(nonnull NSDictionary *)userInfo

(Click for more details)


This method verifies if a notification's sender is Synerise and if the notification is a Silent SDK Command.

static func isSyneriseSilentSDKCommand(_: [AnyHashable: Any]) -> Bool
+ (BOOL)isSyneriseSilentSDKCommand:(nonnull NSDictionary *)userInfo

(Click for more details)


This method verifies if a notification is encrypted.

static func isNotificationEncrypted(_: [AnyHashable: Any]) -> Bool
+ (BOOL)isNotificationEncrypted:(nonnull NSDictionary *)userInfo

(Click for more details)


This method decrypts the notification payload.

static func decryptNotification(_: [AnyHashable: Any]) -> [AnyHashable: Any]?
+ (nullable NSDictionary *)decryptNotification:(nonnull NSDictionary *)userInfo

(Click for more details)


This method handles a notification payload and starts activity.

static func handleNotification(_: [AnyHashable: Any])
+ (void)handleNotification:(nonnull NSDictionary *)userInfo

(Click for more details)


This method handles a notification payload with a user interaction and starts activity.

static func handleNotification(_: [AnyHashable: Any], actionIdentifier: String)
+ (void)handleNotification:(nonnull NSDictionary *)userInfo actionIdentifier:(nullable NSString *)actionIdentifier

(Click for more details)


  • 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:
Headers/SNRClient.h

Related To:
ClientStateDelegate
ClientRegisterAccountContext
ClientConditionalAuthResult
ClientConditionalAuthenticationContext
ClientAuthenticationContext
ClientOAuthAuthenticationContext
ClientFacebookAuthenticationContext
ClientAppleSignInAuthenticationContext
ClientAccountInformation
ClientUpdateAccountContext
ClientUpdateAccountBasicInformationContext
ClientPasswordResetRequestContext
ClientPasswordResetConfirmationContext
Token

Inherits From:
NSObject

Declaration:

class Client: NSObject
@interface SNRTracker : NSObject

Methods:

This method sets an object for a customers's state delegate methods.

static func setClientStateDelegate(_: ClientStateDelegate)
+ (void)setClientStateDelegate:(nonnull id<SNRClientStateDelegate>)delegate

(Click for more details)


This method registers a new customer with an email, password, and optional data.

static func registerAccount(context: ClientRegisterAccountContext, success: ((Bool) -> Void), failure: ((Error) -> Void))
+ (void)registerAccount:(nonnull SNRClientRegisterAccountContext *)context success:(nonnull void (^)(BOOL isSuccess))success failure:(nonnull void (^)(NSError *error))failure

(Click for more details)


This method confirms a customer account with the confirmation token.

static func confirmAccountActivation(token: String, success: ((Bool) -> Void), failure: ((Error) -> Void))
+ (void)confirmAccount:(nonnull NSString *)token success:(nonnull void (^)(BOOL isSuccess))success failure:(nonnull void (^)(NSError *error))failure

(Click for more details)


This method activates a customer with email.

static func requestAccountActivation(email: String, success: ((Bool) -> Void), failure: ((Error) -> Void))
+ (void)requestAccountActivation:(nonnull NSString *)email success:(nonnull void (^)(BOOL isSuccess))success failure:(nonnull void (^)(NSError *error))failure

(Click for more details)


This method requests a customer's account registration process with the PIN code.

static func requestAccountActivationByPin(email: String, success: ((Bool) -> Void), failure: ((ApiError) -> Void)) -> Void
+ (void)requestAccountActivationByPinWithEmail:(nonnull NSString *)email success:(nonnull void (^)(BOOL isSuccess))success failure:(nonnull void (^)(SNRApiError *error))failure

(Click for more details)


This method confirms a customer's account registration process with the PIN code.

static func confirmAccountActivationByPin(pinCode: String, email: String, success: ((Bool) -> Void), failure: ((ApiError) -> Void)) -> Void
+ (void)confirmAccountActivationByPin:(nonnull NSString *)pinCode email:(nonnull NSString *)email success:(nonnull void (^)(BOOL isSuccess))success failure:(nonnull void (^)(SNRApiError *error))failure

(Click for more details)


This method signs a customer in to obtain a JSON Web Token (JWT) which can be used in subsequent requests.

static func signIn(email: String, password: String, success: ((Bool) -> Void), failure: ((Error) -> Void))
+ (void)signInWithEmail:(nonnull NSString *)email password:(nonnull NSString *)password success:(nonnull void (^)(BOOL isSuccess))success failure:(nonnull void (^)(NSError *error))failure

(Click for more details)


This method signs a customer in to obtain a JSON Web Token (JWT) which can be used in subsequent requests.

static func signInConditionally(email: String, password: String, success: ((ClientAuthenticationResult) -> Void), failure: ((Error) -> Void))
+ (void)signInConditionallyWithEmail:(nonnull NSString *)email password:(nonnull NSString *)password success:(nonnull void (^)(SNRClientAuthenticationResult *authResult))success failure:(nonnull void (^)(NSError *error))failure

(Click for more details)


This method authenticates a customer with OAuth, Facebook, Google, Apple, or Synerise.

static func authenticate(token: AnyObject, clientIdentityProvider: ClientIdentityProvider, authID: String?, context: ClientAuthenticationContext?, success: ((Bool) -> Void), failure: ((ApiError) -> Void))
+ (void)authenticateWithToken:(id)token clientIdentityProvider:(SNRClientIdentityProvider)clientIdentityProvider authID:(nullable NSString *)authID context:(nullable SNRClientAuthenticationContext *)context success:(void (^)(BOOL isSuccess))success failure:(void (^)(SNRApiError *error))failure

(Click for more details)


This method authenticates a customer with OAuth, Facebook, Google, Apple, or Synerise.

static func authenticateConditionally(token: AnyObject, clientIdentityProvider: ClientIdentityProvider, authID: String?, context: ClientConditionalAuthenticationContext?, success: ((ClientAuthenticationResult) -> Void), failure: ((ApiError) -> Void))
+ (void)authenticateConditionallyWithToken:(id)token clientIdentityProvider:(SNRClientIdentityProvider)clientIdentityProvider authID:(nullable NSString *)authID context:(nullable SNRClientConditionalAuthenticationContext *)context success:(void (^)(SNRClientAuthenticationResult *authResult))success failure:(void (^)(SNRApiError *error))failure

(Click for more details)


This method authenticates a customer with OAuth.

static func authenticateByOAuth(accessToken: String, authID: String?, context: ClientOAuthAuthenticationContext?, success: ((Bool) -> Void), failure: ((Error) -> Void))
+ (void)authenticateByOAuthWithAccessToken:(nonnull NSString *)accessToken authID:(nullable NSString *)authID context:(nullable SNRClientOAuthAuthenticationContext *)context success:(nonnull void (^)(BOOL isSuccess))success failure:(nonnull void (^)(NSError *error))failure

(Click for more details) - REMOVED in version 5.0.0


This method authenticates a customer with OAuth.

static func authenticateByOAuthIfRegistered(accessToken: String, authID: String?, success: ((Bool) -> Void), failure: ((Error) -> Void))
+ (void)authenticateByOAuthIfRegisteredWithAccessToken:(nonnull NSString *)accessToken authID:(nullable NSString *)authID success:(nonnull void (^)(BOOL isSuccess))success failure:(nonnull void (^)(NSError *error))failure

(Click for more details) - REMOVED in version 5.0.0


This method authenticates a customer with Facebook.

static func authenticateByFacebook(facebookToken: String, authID: String?, context: ClientFacebookAuthenticationContext?, success: ((Bool) -> Void), failure: ((Error) -> Void))
+ (void)authenticateByFacebookWithFacebookToken:(nonnull NSString *)facebookToken authID:(nullable NSString *)authID context:(nullable SNRClientFacebookAuthenticationContext *)context success:(nonnull void (^)(BOOL isSuccess))success failure:(nonnull void (^)(NSError *error))failure

(Click for more details) - REMOVED in version 5.0.0


This method authenticates a customer with Facebook.

static func authenticateByFacebookIfRegistered(facebookToken: String, authID: String?, success: ((Bool) -> Void), failure: ((Error) -> Void))
+ (void)authenticateByFacebookIfRegisteredWithFacebookToken:(nonnull NSString *)facebookToken authID:(nullable NSString *)authID success:(nonnull void (^)(BOOL isSuccess))success failure:(nonnull void (^)(NSError *error))failure

(Click for more details) - REMOVED in version 5.0.0


This method authenticates a customer with Sign In With Apple.

static func authenticateByAppleSignIn(identityToken: Data, authID: String?, context: ClientAppleSignInAuthenticationContext?, success: ((Bool) -> Void), failure: ((Error) -> Void))
+ (void)authenticateByAppleSignInWithIdentityToken:(nonnull NSData *)identityToken authID:(nullable NSString *)authID context:(nullable SNRClientAppleSignInAuthenticationContext *)context success:(nonnull void (^)(BOOL isSuccess))success failure:(nonnull void (^)(NSError *error))failure

(Click for more details) - REMOVED in version 5.0.0


This method authenticates a customer with Sign In With Apple.

static func authenticateByAppleSignInIfRegistered(identityToken: Data, authID: String?, success: ((Bool) -> Void), failure: ((Error) -> Void))
+ (void)authenticateByAppleSignInIfRegisteredWithIdentityToken:(nonnull NSData *)identityToken authID:(nullable NSString *)authID success:(nonnull void (^)(BOOL isSuccess))success failure:nonnull void (^)(NSError *error))failure

(Click for more details) - REMOVED in version 5.0.0


This method signs in a customer in with the provided token payload.

static func authenticate(tokenPayload: TokenPayload, authID: String, success: (() -> Void), failure: ((ApiError) -> Void)) -> Void
+ (void)authenticateWithTokenPayload:(SNRTokenPayload *)tokenPayload authID:(NSString *)authID success:(void (^)(void))success failure:(void (^)(SNRApiError *error))failure

(Click for more details)


This method authenticates a customer with Simple Profile Authentication.

static func simpleAuthentication(data: ClientSimpleAuthenticationData, authID: String, success: (() -> Void), failure: ((ApiError) -> Void)) -> Void
+ (void)simpleAuthentication:(SNRClientSimpleAuthenticationData *)data authID:(NSString *)authID success:(void (^)(void))success failure:(void (^)(SNRApiError *error))failure

(Click for more details)


This method checks if a customer is signed in (via Synerise Authentication - RaaS, OAuth, Facebook, Apple).

static func isSignedIn() -> Bool
+ (BOOL)isSignedIn

(Click for more details)


This method checks if a customer is signed in (via Simple Profile Authentication).

static func isSignedInViaSimpleAuthentication() -> Bool
+ (BOOL)isSignedInViaSimpleAuthentication

(Click for more details)


This method signs out a customer out.

static func signOut()
+ (void)signOut

(Click for more details)


This method signs out a customer out with a chosen mode.

static func signOut(mode: ClientSignOutMode)
+ (void)signOutWithMode:(SNRClientSignOutMode)mode

(Click for more details) - REMOVED in version 5.0.0


This method signs out a customer out with a chosen mode and Determines if the method should sign out all devices

static func signOut(mode: ClientSignOutMode, fromAllDevices: Bool, success: (() -> Void), failure: ((Error) -> Void))
+ (void)signOutWithMode:(SNRClientSignOutMode)mode fromAllDevices:(BOOL)fromAllDevices success:(void (^)(void))success failure:(void (^)(SNRApiError *error))failure

(Click for more details)


This method refreshes the customer’s current token.

static func refreshToken(success: ((Bool) -> Void), failure: ((Error) -> Void))
+ (void)refreshTokenWithSuccess:(nonnull void (^)(void))success failure:(nonnull void (^)(NSError *error))failure

(Click for more details)


This method retrieves the customer’s current, active token.

static func retrieveToken(success: ((Token) -> Void), failure: ((Error) -> Void))
+ (void)retrieveTokenWithSuccess:(nonnull void (^)(SNRToken *token))success failure:(nonnull void (^)(NSError *error))failure

(Click for more details)


This method retrieves the customer’s current UUID.

static func getUUID() -> String
+ (NSString *)getUUID

(Click for more details)


Retrieves the current UUID or generates a new one from a seed.

static func getUUIDForAuthentication(authID: String) -> String
+ (NSString *)getUUIDForAuthenticationWithAuthID:(NSString *)authID;

(Click for more details)


This method regenerates the UUID and clears the authentication token, login session, custom email, and custom identifier.

static func regenerateUUID()
+ (BOOL)regenerateUUID

(Click for more details)


This method regenerates the UUID and clears the authentication token, login session, custom email, and custom identifier.

static func regenerateUUID(clientIdentifier: String)
+ (BOOL)regenerateUUIDWithClientIdentifier:(nullable NSString *)clientIdentifier

(Click for more details)


This method destroys the session completely.

static func destroySession()
+ (void)destroySession

(Click for more details)


This method gets a customer’s account information.

static func getAccount(success: ((ClientAccountInformation) -> Void), failure: ((Error) -> Void))
+ (void)getAccountWithSuccess:(void (^)(SNRClientAccountInformation *accountInformation))success failure:(void (^)(NSError *error))failure

(Click for more details)


This method retrieves events for an authenticated customer.

static func getEvents(apiQuery: ClientEventsApiQuery, success: (([ClientEventData]) -> Void), failure: ((Error) -> Void))
+ (void)getEventsWithApiQuery:(nonnull SNRClientEventsApiQuery *)apiQuery success:(nonnull void (^)(NSArray<SNRClientEventData *> *events))success failure:(nonnull void (^)(NSError *error))failure

(Click for more details)


This method updates a customer’s account’s basic information (without identification data: uuid, customId, email).

static func updateAccountBasicInformation(context: ClientUpdateAccountBasicInformationContext, success: ((Bool) -> Void), failure: ((Error) -> Void))
+ (void)updateAccountBasicInformation:(nonnull SNRClientUpdateAccountBasicInformationContext *)context success:(nonnull void (^)(BOOL isSuccess))success failure:(nonnull void (^)(NSError *error))failure

(Click for more details)


This method updates a customer’s account information.

static func updateAccount(context: ClientUpdateAccountContext, success: ((Bool) -> Void), failure: ((Error) -> Void))
+ (void)updateAccount:(nonnull SNRClientUpdateAccountContext *)context success:(nonnull void (^)(BOOL isSuccess))success failure:(nonnull void (^)(NSError *error))failure

(Click for more details)


This method requests a customer’s password reset with email.

static func requestPasswordReset(context: ClientPasswordResetRequestContext, success: ((Bool) -> Void), failure: ((Error) -> Void))
+ (void)requestPasswordReset:(nonnull SNRClientPasswordResetRequestContext *)context success:(nonnull void (^)(BOOL isSuccess))success failure:(nonnull void (^)(NSError *error))failure

(Click for more details)


This method confirm a customer’s password reset with the new password and token provided by password reset request.

static func confirmResetPassword(context: ClientPasswordResetConfirmationContext, success: ((Bool) -> Void), failure: ((Error) -> Void))
+ (void)confirmResetPassword:(nonnull SNRClientPasswordResetConfirmationContext *)context success:(nonnull void (^)(BOOL isSuccess))success failure:(nonnull void (^)(NSError *error))failure

(Click for more details)


This method changes a customer’s password.

static func changePassword(password: String, oldPassword: String, success: ((Bool) -> Void), failure: ((Error) -> Void))
+ (void)changePassword:(nonnull NSString *)password oldPassword:(nonnull NSString *)oldPassword success:(nonnull void (^)(BOOL isSuccess))success failure:(nonnull void (^)(NSError *error))failure

(Click for more details)


This method requests a customer's email change.

static func requestEmailChange(email: String, password: String?, externalToken: AnyObject?, authID: String?, success: ((Bool) -> Void), failure: ((ApiError) -> Void))
+ (void)requestEmailChange:(NSString *)email password:(nullable NSString *)password externalToken:(nullable id)externalToken authID:(nullable NSString *)authID success:(nonnull void (^)(BOOL isSuccess))success failure:(nonnull void (^)(SNRApiError *error))failure

(Click for more details)


This method confirms an email change.

static func confirmEmailChange(token: String, newsletterAgreement: Bool, success: ((Bool) -> Void), failure: ((Error) -> Void))
+ (void)confirmEmailChange:(nonnull NSString *)token newsletterAgreement:(BOOL)newsletterAgreement success:(nonnull void (^)(BOOL isSuccess))success failure:(nonnull void (^)(NSError *error))failure

(Click for more details)


Requests a customer's phone update. A confirmation code is sent to the phone number.

static func requestPhoneUpdate(phone: String, success: ((Bool) -> Void), failure: ((Error) -> Void))
+ (void)requestPhoneUpdate:(nonnull NSString *)phone success:(nonnull void (^)(BOOL isSuccess))success failure:(nonnull void (^)(NSError *error))failure

(Click for more details)


This method confirms a phone number update. This action requires the new phone number and confirmation code as parameters.

static func confirmPhoneUpdate(phone:confirmationCode: String, smsAgreement: Bool, success: ((Bool) -> Void), failure: ((Error) -> Void))
+ (void)confirmPhoneUpdate:(nonnull NSString *)phone confirmationCode:(nonnull NSString *)confirmationCode smsAgreement:(BOOL)smsAgreement success:(nonnull void (^)(BOOL isSuccess))success failure:(nonnull void (^)(NSError *error))failure

(Click for more details)


This method deletes a customer's account.

static func deleteAccount(clientAuthFactor: AnyObject, clientIdentityProvider: ClientIdentityProvider, authID: String, success: ((Bool) -> Void), failure: ((Error) -> Void))
+ (void)deleteAccount:(nonnull id)clientAuthFactor clientIdentityProvider:(SNRClientIdentityProvider)clientIdentityProvider authID:(nullable NSString *)authID success:(nonnull void (^)(BOOL isSuccess))success failure:(nonnull void (^)(NSError *error))failure

(Click for more details)


This method deletes a customer's account.

static func deleteAccount(password: String, success: ((Bool) -> Void), failure: ((Error) -> Void))
+ (void)deleteAccount:(nonnull NSString *)password success:(nonnull void (^)(BOOL isSuccess))success failure:(nonnull void (^)(NSError *error))failure

(Click for more details) - DEPRECATED in version 3.6.19


This method passes the Firebase Token to Synerise for notifications and doesn't update the agreement of the profile.

static func registerForPush(registrationToken: String, success: ((Bool) -> Void), failure: ((Error) -> Void))
+ (void)registerForPush:(nonnull NSString *)registrationToken success:(nonnull void (^)(BOOL isSuccess))success failure:(nonnull void (^)(NSError *error))failure

(Click for more details)


This method passes the Firebase Token to Synerise for notifications.

static func registerForPush(registrationToken: String, mobilePushAgreement: Bool, success: ((Bool) -> Void), failure: ((Error) -> Void))
+ (void)registerForPush:(nonnull NSString *)registrationToken mobilePushAgreement:(BOOL)mobilePushAgreement success:(nonnull void (^)(BOOL isSuccess))success failure:(nonnull void (^)(NSError *error))failure

(Click for more details)



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:
Headers/SNRTracker.h

Related To:
Event
TrackerParams
TrackerParamsBuilder

Inherits From:
NSObject

Declaration:

class Tracker: NSObject
@interface SNRTracker : NSObject

Methods:

This method sets an object for Tracker module delegate methods.

static func setDelegate(_: TrackerDelegate)
+ (void)setDelegate:(nonnull id<SNRTrackerDelegate>)delegate

Click for more details


This method sets a custom identifier in the parameters of every event.

static func setCustomIdentifier(_: String?)
+ (void)setCustomIdentifier:(nullable NSString *)customIdentifier

(Click for more details)


This method sets a custom email in the parameters of every event.

static func setCustomEmail(_: String?)
+ (void)setCustomEmail:(nullable NSString *)customEmail

(Click for more details)


This method sends an event.

static func send(_: Event)
+ (void)send:(SNREvent *)event

(Click for more details)


This method forces sending the events from the queue to the server.

static func flushEvents(completionHandler: (() -> Void)?)
+ (void)flushEventsWithCompletionHandler:(nullable void (^)(void))completion

(Click for more details)



Injector

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

Declared In:
Headers/SNRInjector.h

Inherits From:
NSObject

Declaration:

class Injector: NSObject
@interface SNRInjector : NSObject

Methods:

This method sets an object for in-app messages delegate methods.

static func setInAppMessageDelegate(_: InjectorInAppMessageDelegate)
+ (void)setInAppMessageDelegate:(id<SNRInjectorInAppMessageDelegate>)delegate

(Click for more details)


Closes an in-app message and sends an inApp.discard event.

Usage examples:

  • Closing a top bar or bottom bar when the user taps outside the in-app area.
  • Automatically dismissing messages when navigating away from a screen.
  • Controlling in-app visibility based on app logic for a smoother user experience.
    static func closeInAppMessage(campaignHash: String) -> Void
    
    + (void)closeInAppMessage:(nonnull NSString *)campaignHash
    

(Click for more details)


This method fetches a walkthrough.

static func getWalkthrough()
+ (void)getWalkthrough

(Click for more details) - REMOVED in version 5.0.0


This method shows a walkthrough when it is loaded.

static func showWalkthrough()
+ (void)showWalkthrough

(Click for more details) - REMOVED in version 5.0.0


This method checks if a walkthrough is loaded.

static func isWalkthroughLoaded() -> Bool
+ (BOOL)isWalkthroughLoaded

(Click for more details) - REMOVED in version 5.0.0


This method checks if the walkthrough is unique compared to the previous one.

static func isLoadedWalkthroughUnique() -> Bool
+ (BOOL)isLoadedWalkthroughUnique

(Click for more details) - REMOVED in version 5.0.0


This method fetches Push Notifications set for mobile campaigns.

static func getPushes(success: (([[AnyHashable: Any]]) -> Void), failure: ((Error) -> Void))
+ (void)getPushesWithSuccess:(nonnull void (^)(NSArray<NSDictionary *> *pushes))success failure:(nonnull void (^)(NSError *error))failure

(Click for more details) - REMOVED in version 5.0.0


This method provides valid banners directly from SDK cache.

static func getBanners() -> [[AnyHashable: Any]]
+ (nonnull NSArray<NSDictionary *> *)getBanners

(Click for more details) - REMOVED in version 4.6.0


This method fetches banners set for mobile campaigns and caches the valid ones.

static func fetchBanners(success: (([[AnyHashable: Any]]) -> Void), failure: ((Error) -> Void))
+ (void)fetchBannersWithSuccess:(nonnull void (^)(NSArray<NSDictionary *> *banners))success failure:(nonnull void (^)(NSError *error))failure

(Click for more details) - REMOVED in version 4.6.0


This method shows a banner immediately.

static func showBanner(_: [AnyHashable: Any], markPresented: Bool)
+ (void)showBanner:(nonnull NSDictionary *)bannerDictionary markPresented:(BOOL)markPresented

(Click for more details) - REMOVED in version 4.6.0



Promotions

The module for handling promotions and vouchers from Synerise SDK.

Declared In:
Headers/SNRPromotions.h

Related To:
PromotionsApiQuery
PromotionIdentifier
PromotionResponse
Promotion
AssignVoucherResponse
VoucherCodesResponse

Inherits From:
NSObject

Declaration:

class Promotions: NSObject
@interface SNRPromotions : NSObject

Methods: This method retrieves all available promotions that are defined for a customer.

static func getPromotions(success: ((PromotionResponse) -> Void), failure: ((Error) -> Void))
+ (void)getPromotionsWithSuccess:(nonnull void (^)(SNRPromotionResponse *promotionResponse))success failure:(nonnull void (^)(NSError *error))failure

(Click for more details)


This method retrieves promotions that match the parameters defined in an API query.

static func getPromotions(apiQuery: PromotionsApiQuery, success: ((PromotionResponse) -> Void), failure: ((Error) -> Void))
+ (void)getPromotionsWithApiQuery:(nonnull SNRPromotionsApiQuery *)apiQuery success:(nonnull void (^)(SNRPromotionResponse *promotionResponse))success failure:(nonnull void (^)(NSError *error))failure

(Click for more details)


This method retrieves the promotion with the specified UUID.

static func getPromotion(uuid: String, success: ((Promotion) -> Void), failure: ((Error) -> Void))
+ (void)getPromotionByUuid:(nonnull NSString *)uuid success:(nonnull void (^)(SNRPromotion *promotion))success failure:(nonnull void (^)(NSError *error))failure

(Click for more details)


This method retrieves the promotion with the specified code.

static func getPromotion(code: String, success: ((Promotion) -> Void), failure: ((Error) -> Void))
+ (void)getPromotionByCode:(nonnull NSString *)code success:(nonnull void (^)(SNRPromotion *promotion))success failure:(nonnull void (^)(NSError *error))failure

(Click for more details)


This method activates the promotion with the specified UUID.

static func activatePromotion(uuid: String, success: ((Bool) -> Void), failure: ((Error) -> Void))
+ (void)activatePromotionByUuid:(nonnull NSString *)uuid success:(nonnull void (^)(BOOL isSuccess))success failure:(nonnull void (^)(NSError *error))failure

(Click for more details)


This method activates the promotion with the specified code.

static func activatePromotion(code: String, success: ((Bool) -> Void), failure: ((Error) -> Void))
+ (void)activatePromotionByCode:(nonnull NSString *)code success:(nonnull void (^)(BOOL isSuccess))success failure:(nonnull void (^)(NSError *error))failure

(Click for more details)


This method activates promotions with a code or with UUID in a batch.

static func activatePromotions(identifiers: [PromotionIdentifier], success: ((Bool) -> Void), failure: ((ApiError) -> Void)) -> Void
+ (void)activatePromotionsWithIdentifiers:(nonnull NSArray<SNRPromotionIdentifier *> *)identifiers success:(nonnull void (^)(BOOL isSuccess))success failure:(nonnull void (^)(SNRApiError *error))failure

(Click for more details)


This method deactivates the promotion with the specified UUID.

static func deactivatePromotion(uuid: String, success: ((Bool) -> Void), failure: ((Error) -> Void))
+ (void)deactivatePromotionByUuid:(nonnull NSString *)uuid success:(nonnull void (^)(BOOL isSuccess))success failure:(nonnull void (^)(NSError *error))failure

(Click for more details)


This method deactivates the promotion with the specified code.

static func deactivatePromotion(code: String, success: ((Bool) -> Void), failure: ((Error) -> Void))
+ (void)deactivatePromotionByUuid:(nonnull NSString *)uuid success:(nonnull void (^)(BOOL isSuccess))success failure:(nonnull void (^)(NSError *error))failure

(Click for more details)


This method deactivates promotions with a code or with UUID in a batch.

static func deactivatePromotions(identifiers: [PromotionIdentifier], success: ((Bool) -> Void), failure: ((ApiError) -> Void)) -> Void
+ (void)deactivatePromotionsWithIdentifiers:(nonnull NSArray<SNRPromotionIdentifier *> *)identifiers success:(nonnull void (^)(BOOL isSuccess))success failure:(nonnull void (^)(SNRApiError *error))failure

(Click for more details)


This method retrieves an assigned voucher code or assigns a voucher from a pool identified by UUID to the profile.

When the voucher is assigned for the first time, a voucherCode.assigned event is produced.

static func getOrAssignVoucher(poolUUID: String, success: ((AssignVoucherResponse) -> Void), failure: ((Error) -> Void))
+ (void)getOrAssignVoucherWithPoolUUID:(NSString *)poolUUID success:(void (^)(SNRAssignVoucherResponse *assignVoucherResponse))success failure:(void (^)(NSError *error))failure

(Click for more details)


This method assigns a voucher from a pool identified by UUID to the profile.

A voucherCode.assigned event is produced.

static func assignVoucherCode(poolUUID: String, success: ((AssignVoucherResponse) -> Void), failure: ((Error) -> Void))
+ (void)assignVoucherCodeWithPoolUUID:(nonnull NSString *)poolUUID success:(nonnull void (^)(SNRAssignVoucherResponse *assignVoucherResponse))success failure:(nonnull void (^)(NSError *error))failure

(Click for more details)


This method retrieves voucher codes for a customer.

static func getAssignedVoucherCodes(success: ((VoucherCodesResponse) -> Void), failure: ((Error) -> Void))
+ (void)getAssignedVoucherCodesWithSuccess:(nonnull void (^)(SNRVoucherCodesResponse *voucherCodesResponse))success failure:(nonnull void (^)(NSError *error))failure

(Click for more details)



Content

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

Declared In:
Headers/SNRContent.h

Related To:
Document
DocumentApiQuery
DocumentsApiQuery
RecommendationResponse
Recommendation
ScreenView
ScreenViewApiQuery

Inherits From:
NSObject

Declaration:

class Content: NSObject
@interface SNRContent : NSObject

Methods:

This method generates the document assigned to a slug.

static func getDocument(slug: String, success: (([AnyHashable: Any]) -> Void), failure: ((Error) -> Void))
+ (void)getDocument:(nonnull NSString *)slug success:(nonnull void (^)(NSDictionary *document))success failure:(nonnull void (^)(NSError *error))failure

(Click for more details) - REMOVED in version 5.0.0


This method generates the document that is defined for the provided slug.

static func generateDocument(slug: String, success: ((Document) -> Void), failure: ((Error) -> Void))
+ (void)generateDocument:(nonnull NSString *)slug success:(nonnull void (^)(SNRDocument *document))success failure:(nonnull void (^)(NSError *error))failure

(Click for more details)


This method generates the document that is defined for parameters provided in the query object.

static func generateDocument(apiQuery: DocumentApiQuery, success: ((Document) -> Void), failure: ((ApiError) -> Void))
+ (void)generateDocumentWithApiQuery:(SNRDocumentApiQuery *)apiQuery success:(void (^)(SNRDocument *document))success failure:(void (^)(SNRApiError *error))failure

(Click for more details)


This method generates documents that are defined for parameters provided in the query object.

static func getDocuments(apiQuery: DocumentsApiQuery, success: (([[AnyHashable: Any]]) -> Void), failure: ((Error) -> Void))
+ (void)getDocumentsWithApiQuery:(nonnull SNRDocumentsApiQuery *)apiQuery success:(nonnull void (^)(NSArray *documents))success failure:(nonnull void (^)(NSError *error))failure

(Click for more details) - REMOVED in version 5.0.0


This method generates recommendations that are defined for the options provided. The recommendations are generated by using a document with an insert.

For instructions, see "Displaying AI recommendations > With documents and screen views".

static func getRecommendations(options: RecommendationOptions, success: ((RecommendationResponse) -> Void), failure: ((Error) -> Void))
+ (void)getRecommendations:(nonnull SNRRecommendationOptions *)options success:(nonnull void (^)(SNRRecommendationResponse *recommendationResponse))success failure:(nonnull void (^)(NSError *error))failure

(Click for more details) - REMOVED in version 5.0.0


This method generates recommendations that are defined for the options provided. The recommendations are generated by using a document with an insert.

For instructions, see "Displaying AI recommendations > With documents and screen views".

static func getRecommendationsV2(options: RecommendationOptions, success: ((RecommendationResponse) -> Void), failure: ((Error) -> Void))
+ (void)getRecommendationsV2:(nonnull SNRRecommendationOptions *)options success:(nonnull void (^)(SNRRecommendationResponse *recommendationResponse))success failure:(nonnull void (^)(NSError *error))failure

(Click for more details)


This method generates the customer's highest-priority screen view campaign.

static func getScreenView(success: ((ScreenViewResponse) -> Void), failure: ((ApiError) -> Void))
+ (void)getScreenViewWithSuccess:(nonnull void (^)(SNRScreenViewResponse *screenViewResponse))success failure:(nonnull void (^)(SNRApiError *error))failure

(Click for more details) - REMOVED in version 5.0.0


This method generates a customer's highest-priority screen view campaign from the feed with the provided feed slug.

static func generateScreenView(feedSlug: String, success: ((ScreenView) -> Void), failure: ((ApiError) -> Void))
+ (void)generateScreenView:(NSString *)feedSlug success:(nonnull void (^)(SNRScreenView *screenView))success failure:(nonnull void (^)(SNRApiError *error))failure

(Click for more details)

This method generates customer's highest-priority screen view campaign that is defined for parameters provided in the query object.

static func generateScreenView(apiQuery: ScreenViewApiQuery, success: ((ScreenView) -> Void), failure: ((ApiError) -> Void))
+ (void)generateScreenView:(SNRScreenViewApiQuery *)apiQuery success:(nonnull void (^)(SNRScreenView *screenView))success failure:(nonnull void (^)(SNRApiError *error))failure

(Click for more details)

Canonical URL: https://hub.synerise.com/developers/mobile-sdk/class-reference/ios/modules