Campaigns

Set Notification delegate


This method sets an object for simple push campaigns delegate methods. Declared In:
Headers/SNRSynerise.h

Related To:
NotificationDelegate

Class:
Synerise

Declaration:

static func setNotificationDelegate(_ delegate: NotificationDelegate)
+ (void)setNotificationDelegate:(SNRNotificationDelegate *)delegate

Discussion:
Learn more about the methods and the purpose of this listener here.

Set In-App Message delegate


This method sets an object for in-app message campaigns delegate methods. Declared In:
Headers/SNRInjector.h

Related To:
InjectorInAppMessageDelegate

Class:
Injector

Declaration:

static func setInAppMessageDelegate(_ delegate: InjectorInAppMessageDelegate)
+ (void)setInAppMessageDelegate:(SNRInjectorInAppMessageDelegate *)delegate

Discussion:
Learn more about the methods and the purpose of this listener here.

Close In-App message


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.
iOS SDK Android SDK React Native SDK Flutter SDK
Introduced in: 5.7.0 6.7.0 1.5.0 2.5.0
Declared In:
Headers/SNRInjector.h

Class:
Injector

Declaration:

static func closeInAppMessage(campaignHash: String) -> Void
+ (void)closeInAppMessage:(nonnull NSString *)campaignHash

Parameters:

Parameter Type Mandatory Default Description
campaignHash string yes - Unique identifier of the in-app campaign

Set Notification categories


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

  • @note All notification categories must be supported by the app to function properly. Declared In:
    Headers/SNRSynerise.h

Class:
Synerise

Declaration:

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

Parameters:

Parameter Type Mandatory Default Description
notificationCategories Set yes - A set of objects containing all the actions displayed in the notification interface.

Return Value:
No value is returned.

Register for push notifications


This method passes the Firebase Token to Synerise for notifications.

  • You should call this method every time the user changes the system or application consent for notifications.
  • The API key must have the API_PERSONAL_DEVICE_CLIENT_UPDATE permission from the Client group.
  • If the registration fails, the SDK requests a token update again by a listener/delegate method (Android, iOS, React Native, Flutter).

Declared In:
Headers/SNRClient.h

Class:
Client

Declaration:

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

Parameters:

Parameter Type Mandatory Default Description
registrationToken String yes - Firebase Token
mobilePushAgreement Bool yes - Agreement (consent) for mobile push campaigns
success (() -> Void) yes - Closure/Block to be executed when the operation is completed successfully
failure ((ApiError) -> Void) yes - Closure/Block to be executed when the operation is completed with an error

Since version 5.0.0, the success closure does NOT contain the isSuccess parameter.

Return Value:
No value is returned.

Example:

func messaging(_ messaging: Messaging, didReceiveRegistrationToken fcmToken: String) {
    Client.registerForPush(registrationToken: fcmToken, mobilePushAgreement: true, success: {
      // success
    }, failure: { (error) in
      // failure
    })
}
- (void)messaging:(FIRMessaging *)messaging didReceiveRegistrationToken:(NSString *)fcmToken {
    [SNRClient registerForPush:fcmToken mobilePushAgreement:YES success:^() {
      // success
    } failure:^(SNRApiError * _Nonnull error) {
      // failure
    }];
}

Register for push notifications without agreement


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

iOS SDK Android SDK React Native SDK Flutter SDK
Introduced in: 4.14.0 5.7.1 0.15.0 1.1.0

The API key must have the API_PERSONAL_DEVICE_CLIENT_UPDATE permission from the Client group.

If the registration fails, the SDK requests a token update again by a listener/delegate method (Android, iOS, React Native, Flutter).

Declared In:
Headers/SNRClient.h

Class:
Client

Declaration:

static func registerForPush(registrationToken: String, success: (() -> Void), failure: ((ApiError) -> Void)) -> Void
+ (void)registerForPush:(nonnull NSString *)registrationToken success:(nonnull void (^)(void))success failure:(nonnull void (^)(SNRApiError *error))failure

Parameters:

Parameter Type Mandatory Default Description
registrationToken String yes - Firebase Token
success (() -> Void) yes - Closure/Block to be executed when the operation is completed successfully
failure ((ApiError) -> Void) yes - Closure/Block to be executed when the operation is completed with an error

Since version 5.0.0, the success closure does NOT contain the isSuccess parameter.

Return Value:
No value is returned.

Example:

func messaging(_ messaging: Messaging, didReceiveRegistrationToken fcmToken: String) {
    Client.registerForPush(registrationToken: fcmToken, success: {
      // success
    }, failure: { (error) in
      // failure
    })
}
- (void)messaging:(FIRMessaging *)messaging didReceiveRegistrationToken:(NSString *)fcmToken {
    [SNRClient registerForPush:fcmToken success:^() {
      // success
    } failure:^(SNRApiError * _Nonnull error) {
      // failure
    }];
}

Check if push notification is from Synerise


This method verifies if a notification was sent by Synerise. Declared In:
Headers/SNRSynerise.h

Class:
Synerise

Declaration:

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

Parameters:

Parameter Type Mandatory Default Description
userInfo [AnyHashable: Any] yes - Key-Value map of data

Return Value:
true if the notification is provided by Synerise, otherwise returns false.

Example:

//MARK: - UNUserNotificationCenterDelegate
extension NotificationService: UNUserNotificationCenterDelegate {
    func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {
        let userInfo = response.notification.request.content.userInfolet isSyneriseNotification = Synerise.isSyneriseNotification(userInfo)
        if isSyneriseNotification == true {
            // notification is from Synerise
        }
    }
}
#pragma mark - UNUserNotificationCenterDelegate
- (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)(void))completionHandler NS_AVAILABLE_IOS(10) {
    NSDictionary *userInfo = response.notification.request.content.userInfo;
    BOOL isSyneriseNotification = [SNRSynerise isSyneriseNotification:userInfo];
    if (isSyneriseNotification == YES) {
        // notification is from Synerise
    }
}

Check if push notification is a Simple Push Campaign


This method verifies if a notification’s sender is Synerise and if the notification is a Simple Push campaign Declared In:
Headers/SNRSynerise.h

Class:
Synerise

Declaration:

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

Parameters:

Parameter Type Mandatory Default Description
userInfo [AnyHashable: Any] yes - Key-Value map of data

Return Value:
true if the notification is Synerise Simple Push provided by Synerise, otherwise returns false.

Example:

//MARK: - UNUserNotificationCenterDelegateextension NotificationService: UNUserNotificationCenterDelegate {
    func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {
        let userInfo = response.notification.request.content.userInfolet isSyneriseNotification = Synerise.isSyneriseNotification(userInfo)
           if isSyneriseNotification == true {
            // notification is from Synerise			let isSyneriseSimplePush = Synerise.isSyneriseSimplePush(userInfo)
            if isSyneriseSimplePush == true {
                // notification is Synerise Simple Push Campaign
            }
        }
    }
}
#pragma mark - UNUserNotificationCenterDelegate- (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)(void))completionHandler NS_AVAILABLE_IOS(10) {
    NSDictionary *userInfo = response.notification.request.content.userInfo;	BOOL isSyneriseNotification = [SNRSynerise isSyneriseNotification:userInfo];
    if (isSyneriseNotification == YES) {
        // notification is from Synerise		BOOL isSyneriseSimplePush = [SNRSynerise isSyneriseSimplePush:userInfo];
        if (isSyneriseSimplePush == YES) {
            // notification is Synerise Simple Push Campaign
        }
    }
}

Check if push notification is a Silent Command


This method verifies if a notification’s sender is Synerise and if the notification is a Silent Command. Declared In:
Headers/SNRSynerise.h

Class:
Synerise

Declaration:

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

Parameters:

Parameter Type Mandatory Default Description
userInfo [AnyHashable: Any] yes - Key-Value map of data

Return Value:
true if the notification is Synerise Silent Command provided by Synerise, otherwise returns false.

Example:

//MARK: - UNUserNotificationCenterDelegateextension NotificationService: UNUserNotificationCenterDelegate {
    func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {
        let userInfo = response.notification.request.content.userInfolet isSyneriseNotification = Synerise.isSyneriseNotification(userInfo)
           if isSyneriseNotification == true {
            // notification is from Synerise			let isSyneriseSilentCommand = Synerise.isSyneriseSilentCommand(userInfo)
            if isSyneriseSilentCommand == true {
                // notification is Synerise Silent Command
            }
        }
    }
}
#pragma mark - UNUserNotificationCenterDelegate- (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)(void))completionHandler NS_AVAILABLE_IOS(10) {
    NSDictionary *userInfo = response.notification.request.content.userInfo;	BOOL isSyneriseNotification = [SNRSynerise isSyneriseNotification:userInfo];
    if (isSyneriseNotification == YES) {
        // notification is from Synerise		BOOL isSyneriseSilentCommand = [SNRSynerise isSyneriseSilentCommand:userInfo];
        if (isSyneriseSilentCommand == YES) {
            // notification is Synerise Silent Command
        }
    }
}

Check if push notification is a Silent SDK Command


This method verifies if a notification's sender is Synerise and if the notification is a Silent SDK Command. Declared In:
Headers/SNRSynerise.h

Class:
Synerise

Declaration:

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

Parameters:

Parameter Type Mandatory Default Description
userInfo [AnyHashable: Any] yes - Key-Value map of data

Return Value:
true if the notification is Synerise Silent SDK Command provided by Synerise, otherwise returns false.

Example:

//MARK: - UNUserNotificationCenterDelegate
extension NotificationService: UNUserNotificationCenterDelegate {
    func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {
        let userInfo = response.notification.request.content.userInfo
        let isSyneriseNotification = Synerise.isSyneriseNotification(userInfo)
           if isSyneriseNotification == true {
            // notification is from Synerise			let isSyneriseSilentSDKCommand = Synerise.isSyneriseSilentSDKCommand(userInfo)
            if isSyneriseSilentSDKCommand == true {
                // notification is Synerise Silent SDK Command
            }
        }
    }
}
#pragma mark - UNUserNotificationCenterDelegate
- (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)(void))completionHandler NS_AVAILABLE_IOS(10) {
    NSDictionary *userInfo = response.notification.request.content.userInfo;
    BOOL isSyneriseNotification = [SNRSynerise isSyneriseNotification:userInfo];
    if (isSyneriseNotification == YES) {
        // notification is from Synerise
        BOOL isSyneriseSilentSDKCommand = [SNRSynerise isSyneriseSilentSDKCommand:userInfo];
        if (isSyneriseSilentSDKCommand == YES) {
            // notification is Synerise Silent SDK Command
        }
    }
}

Check if push notification is encrypted


This method verifies if a notification is encrypted. Declared In:
Headers/SNRSynerise.h

Class:
Synerise

Declaration:

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

Parameters:

Parameter Type Mandatory Default Description
userInfo [AnyHashable: Any] yes - Key-Value map of data

Return Value:
true if the notification is encrypted, otherwise returns false.

Example:

func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
    let isSyneriseNotification = Synerise.isSyneriseNotification(userInfo)
    if isSyneriseNotification == false {
        let isNotificationEncrypted = Synerise.isNotificationEncrypted(userInfo)
        if isNotificationEncrypted == true {
            // Notification is encrypted by Synerise
        }
    }
    //...
}
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
    BOOL isSyneriseNotification = [SNRSynerise isSyneriseNotification:userInfo];
    if (isSyneriseNotification == NO) {
        BOOL isNotificationEncrypted = [SNRSynerise isNotificationEncrypted:userInfo];
        if (isNotificationEncrypted == YES) {
            // Notification is encrypted by Synerise
        }
    }
}

Decrypt push notification


This method decrypts the notification payload.

If the notification is not encrypted, the method returns the raw payload.

If a notification is not decrypted successfully, the method returns nil.

Declared In:
Headers/SNRSynerise.h

Class:
Synerise

Declaration:

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

Parameters:

Parameter Type Mandatory Default Description
userInfo [AnyHashable: Any] yes - Key-Value map of data

Return Value:
Notification’s key-value map of data with decrypted content

Example:

func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
    let isSyneriseNotification = Synerise.isSyneriseNotification(userInfo)
    if isSyneriseNotification == false {
        let isNotificationEncrypted = Synerise.isNotificationEncrypted(userInfo)
        if isNotificationEncrypted == true {
            // Notification is encrypted by Synerise
            if let userDataDecrypted = Synerise.decryptNotification(userInfo) {
                // Notification decryption process was successful
            }
        }
    }
    //...
}
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
    BOOL isSyneriseNotification = [SNRSynerise isSyneriseNotification:userInfo];
    if (isSyneriseNotification == NO) {
        BOOL isNotificationEncrypted = [SNRSynerise isNotificationEncrypted:userInfo];
        if (isNotificationEncrypted == YES) {
            // Notification is encrypted by Synerise
            NSDictionary *userDataDecrypted = Synerise decryptNotification:userData];
            if (userDataDecrypted != nil) {
                // Notification decryption process was successful
            }
        }
    }
}

Handle Synerise push notification


This method handles a notification payload and starts activity. Declared In:
Headers/SNRSynerise.h

Class:
Synerise

Declaration:

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

Parameters:

Parameter Type Mandatory Default Description
userInfo [AnyHashable: Any] yes - Key-Value map of data

Return Value:
No value is returned.

Example:

//MARK: - UNUserNotificationCenterDelegate
extension NotificationService: UNUserNotificationCenterDelegate {
    func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {
        let userInfo = response.notification.request.content.userInfo
        let isSyneriseNotification = Synerise.isSyneriseNotification(userInfo)
           if isSyneriseNotification == true {
            // notification is from Synerise			Synerise.handleNotification(userInfo)
        }
    }
}
#pragma mark - UNUserNotificationCenterDelegate
- (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)(void))completionHandler NS_AVAILABLE_IOS(10) {
    NSDictionary *userInfo = response.notification.request.content.userInfo;
    BOOL isSyneriseNotification = [SNRSynerise isSyneriseNotification:userInfo];
    if (isSyneriseNotification == YES) {
        // notification is from Synerise
        [SNRSynerise handleNotification:userInfo];
    }
}

Handle Synerise push notification with action


This method handles a notification payload with a user interaction and starts activity. Declared In:
Headers/SNRSynerise.h

Class:
Synerise

Declaration:

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

Parameters:

Parameter Type Mandatory Default Description
userInfo [AnyHashable: Any] yes - Key-Value map of data
actionIdentifier String no - Identifier of action received from the notification response

Return Value:
No value is returned.

Example:

//MARK: - UNUserNotificationCenterDelegate
extension NotificationService: UNUserNotificationCenterDelegate {
    func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {
        let userInfo = response.notification.request.content.userInfolet actionIdentifier = response.actionIdentifier
        let isSyneriseNotification = Synerise.isSyneriseNotification(userInfo)
           if isSyneriseNotification == true {
            // notification is from Synerise			Synerise.handleNotification(userInfo, actionIdentifier: actionIdentifier)
        }
    }
}
#pragma mark - UNUserNotificationCenterDelegate
- (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)(void))completionHandler NS_AVAILABLE_IOS(10) {
    NSDictionary *userInfo = response.notification.request.content.userInfo;	NSString *actionIdentifier = response.actionIdentifier;
    BOOL isSyneriseNotification = [SNRSynerise isSyneriseNotification:userInfo];
    if (isSyneriseNotification == YES) {
        // notification is from Synerise
        [SNRSynerise handleNotification:userInfo actionIdentifier:actionIdentifier];
    }
}

Removed methods

Check if push notification is a Banner Campaign {#check-if-push-notification-is-a-banner-campaign}


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

iOS SDK Android SDK React Native SDK Flutter SDK
Removed in: 5.0.0 6.0.0 1.0.0 n/a
Declared In:
Headers/SNRSynerise.h

Class:
Synerise

Declaration:

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

Parameters:

Parameter Type Mandatory Default Description
userInfo [AnyHashable: Any] yes - Key-Value map of data

Return Value:
true if the notification is Synerise Banner provided by Synerise, otherwise returns false.

Example:

//MARK: - UNUserNotificationCenterDelegateextension NotificationService: UNUserNotificationCenterDelegate {
    func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {
        let userInfo = response.notification.request.content.userInfolet isSyneriseNotification = Synerise.isSyneriseNotification(userInfo)
           if isSyneriseNotification == true {
            // notification is from Synerise			let isSyneriseBanner = Synerise.isSyneriseBanner(userInfo)
            if isSyneriseBanner == true {
                // notification is Synerise Banner Campaign
            }
        }
    }
}
#pragma mark - UNUserNotificationCenterDelegate- (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)(void))completionHandler NS_AVAILABLE_IOS(10) {
    NSDictionary *userInfo = response.notification.request.content.userInfo;	BOOL isSyneriseNotification = [SNRSynerise isSyneriseNotification:userInfo];
    if (isSyneriseNotification == YES) {
        // notification is from Synerise		BOOL isSyneriseBanner = [SNRSynerise isSyneriseBanner:userInfo];
        if (isSyneriseBanner == YES) {
            // notification is Synerise Banner Campaign
        }
    }
}

Fetch Banners {#fetch-banners}


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

iOS SDK Android SDK React Native SDK Flutter SDK
Removed in: 4.6.0 4.7.0 0.12.0 n/a
Declared In:
Headers/SNRInjector.h

Class:
Injector

Declaration:

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

Parameters:

Parameter Type Mandatory Default Description
success (([[AnyHashable: Any]]) -> Void) yes - Closure/Block to be executed when the operation is completed successfully
failure ((ApiError) -> Void) yes - Closure/Block to be executed when the operation is completed with an error

Return Value:
No value is returned.

Get Banners {#get-banners}


This method provides valid banners directly from SDK cache.

iOS SDK Android SDK React Native SDK Flutter SDK
Removed in: 4.6.0 4.7.0 0.12.0 n/a
Declared In:
Headers/SNRInjector.h

Class:
Injector

Declaration:

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

Return Value:
List of structures that represents cached Banners.

Show Banner {#show-banner}


This method shows a banner immediately.

iOS SDK Android SDK React Native SDK Flutter SDK
Removed in: 4.6.0 4.7.0 0.12.0 -
Declared In:
Headers/SNRInjector.h

Class:
Injector

Declaration:

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

Parameters:

Parameter Type Mandatory Default Description
bannerDictionary [AnyHashable: Any] yes - Dictionary representation of a banner
markPresented Bool yes - Sets the banner as presented and this banner instance representation will not appear again

Return Value:
No value is returned.

Get Walkthrough {#get-walkthrough}


This method fetches a walkthrough.

iOS SDK Android SDK React Native SDK Flutter SDK
Removed in: 5.0.0 6.0.0 1.0.0 2.0.0

The API key must have the CAMPAIGN_BACKEND_CAMPAIGN_READ permission from the Campaign group.

Declared In:
Headers/SNRInjector.h

Class:
Injector

Declaration:

static func getWalkthrough() -> Void
+ (void)getWalkthrough

Return Value:
No value is returned.

Show Walkthrough {#show-walkthrough}


This method shows a walkthrough when it is loaded.

iOS SDK Android SDK React Native SDK Flutter SDK
Removed in: 5.0.0 6.0.0 1.0.0 2.0.0
Declared In:
Headers/SNRInjector.h

Class:
Injector

Declaration:

static func showWalkthrough() -> Void
+ (void)showWalkthrough

Return Value:
No value is returned.

Check if Walkthrough is loaded {#check-if-walkthrough-is-loaded}


This method checks if a walkthrough is loaded.

iOS SDK Android SDK React Native SDK Flutter SDK
Removed in: 5.0.0 6.0.0 1.0.0 2.0.0
Declared In:
Headers/SNRInjector.h

Class:
Injector

Declaration:

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

Return Value:
true if the walkthrough is loaded, otherwise returns false.

Check if loaded Walkthrough is unique {#check-if-loaded-walkthrough-is-unique}


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

iOS SDK Android SDK React Native SDK Flutter SDK
Removed in: 5.0.0 6.0.0 1.0.0 2.0.0
Declared In:
Headers/SNRInjector.h

Class:
Injector

Declaration:

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

Return Value:
true if the walkthrough is unique, otherwise returns false.

Get pushes {#get-pushes}


This method fetches Push Notifications set for mobile campaigns.

iOS SDK Android SDK React Native SDK Flutter SDK
Removed in: 5.0.0 6.0.0 n/a n/a

The API key must have the CAMPAIGN_BACKEND_COLLECTOR_READ permission from the Collector group.

Declared In:
Headers/SNRInjector.h

Class:
Injector

Declaration:

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

Parameters:

Parameter Type Mandatory Default Description
success (([[AnyHashable: Any]]) -> Void) yes - Closure/Block to be executed when the operation is completed successfully
failure ((ApiError) -> Void) yes - Closure/Block to be executed when the operation is completed with an error

Return Value:
No value is returned.

Canonical URL: https://hub.synerise.com/developers/mobile-sdk/method-reference/ios/campaigns