
## Set Notification delegate
---
This method sets an object for simple push campaigns delegate methods.
**Declared In:**  
Headers/SNRSynerise.h
  
**Related To:**  
[NotificationDelegate](/developers/mobile-sdk/listeners-and-delegates/ios-delegates#notification-delegate)  
  
**Class:**  
Synerise
  
**Declaration:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-950">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-950-0" data-tab-group="tabgrp-950" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-950-1" data-tab-group="tabgrp-950">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-950-0" data-tab-group="tabgrp-950" data-tab-active="true">

```Swift
static func setNotificationDelegate(_ delegate: NotificationDelegate)
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-950-1" data-tab-group="tabgrp-950">

```Objective-C
+ (void)setNotificationDelegate:(SNRNotificationDelegate *)delegate
```

</div>
</div>

  
**Discussion:**  
Learn more about the methods and the purpose of this listener [here](/developers/mobile-sdk/listeners-and-delegates/ios-delegates#notification-delegate).

## 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](/developers/mobile-sdk/listeners-and-delegates/ios-delegates#injector-in-app-message-delegate)  
  
**Class:**  
[Injector](/developers/mobile-sdk/class-reference/ios/modules#injector)
  
**Declaration:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-951">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-951-0" data-tab-group="tabgrp-951" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-951-1" data-tab-group="tabgrp-951">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-951-0" data-tab-group="tabgrp-951" data-tab-active="true">

```Swift
static func setInAppMessageDelegate(_ delegate: InjectorInAppMessageDelegate)
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-951-1" data-tab-group="tabgrp-951">

```Objective-C
+ (void)setInAppMessageDelegate:(SNRInjectorInAppMessageDelegate *)delegate
```

</div>
</div>

  
**Discussion:**  
Learn more about the methods and the purpose of this listener [here](/developers/mobile-sdk/listeners-and-delegates/ios-delegates#injector-in-app-message-delegate).

## 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** |
| ----------------------------------------------- | ----------- | --------------- | -------------------- | --------------- |
| <span style="color:green">Introduced in:</span> | 5.7.0       | 6.7.0           | 1.5.0                 | 2.5.0           |
**Declared In:**  
Headers/SNRInjector.h

**Class:**  
[Injector](/developers/mobile-sdk/class-reference/ios/modules#injector)

**Declaration:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-952">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-952-0" data-tab-group="tabgrp-952" data-tab-active="true">swift</button><button class="tab-button" data-tab-id="tabgrp-952-1" data-tab-group="tabgrp-952">objective-c</button></div>

<div class="tab-panel" data-tab-id="tabgrp-952-0" data-tab-group="tabgrp-952" data-tab-active="true">

```swift
static func closeInAppMessage(campaignHash: String) -> Void
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-952-1" data-tab-group="tabgrp-952">

```objective-c
+ (void)closeInAppMessage:(nonnull NSString *)campaignHash
```

</div>
</div>


**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](/developers/mobile-sdk/class-reference/ios/modules#synerise)
  
**Declaration:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-953">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-953-0" data-tab-group="tabgrp-953" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-953-1" data-tab-group="tabgrp-953">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-953-0" data-tab-group="tabgrp-953" data-tab-active="true">

```Swift
static func setNotificationCategories(_: Set<UNNotificationCategory>) -> Void
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-953-1" data-tab-group="tabgrp-953">

```Objective-C
+ (void)setNotificationCategories:(NSSet<UNNotificationCategory *> *)notificationCategories
```

</div>
</div>



**Parameters:**  
| Parameter | Type | Mandatory | Default | Description |
| --- | --- | --- | --- | --- |
| **notificationCategories** | Set<UNNotificationCategory> | 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.


<div class="admonition admonition-note"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

- 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](/developers/mobile-sdk/listeners-and-delegates/android-listeners#on-register-for-push-listener), [iOS](/developers/mobile-sdk/listeners-and-delegates/ios-delegates#synerise-delegate-register-for-push-notifications-is-needed), [React Native](/developers/mobile-sdk/listeners-and-delegates/react-native-listeners#notifications-listener), [Flutter](/developers/mobile-sdk/listeners-and-delegates/flutter-listeners#notifications-listener)).

</div></div></div>

**Declared In:**  
Headers/SNRClient.h
  
**Class:**  
[Client](/developers/mobile-sdk/class-reference/ios/modules#client)
  
**Declaration:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-954">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-954-0" data-tab-group="tabgrp-954" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-954-1" data-tab-group="tabgrp-954">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-954-0" data-tab-group="tabgrp-954" data-tab-active="true">

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

</div>

<div class="tab-panel" data-tab-id="tabgrp-954-1" data-tab-group="tabgrp-954">

```Objective-C
+ (void)registerForPush:(nonnull NSString *)registrationToken mobilePushAgreement:(BOOL)mobilePushAgreement success:(nonnull void (^)(void))success failure:(nonnull void (^)(SNRApiError *error))failure
```

</div>
</div>

  
**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](/developers/mobile-sdk/class-reference/ios/miscellaneous#snrapierror)) -> Void) | yes | - | Closure/Block to be executed when the operation is completed with an error |
  

<div class="admonition admonition-note"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

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

</div></div></div>

  
**Return Value:**  
No value is returned.
  
**Example:**

<div class="content-tabs code-tabs" data-tab-group="tabgrp-955">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-955-0" data-tab-group="tabgrp-955" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-955-1" data-tab-group="tabgrp-955">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-955-0" data-tab-group="tabgrp-955" data-tab-active="true">

```Swift
func messaging(_ messaging: Messaging, didReceiveRegistrationToken fcmToken: String) {
    Client.registerForPush(registrationToken: fcmToken, mobilePushAgreement: true, success: {
      // success
    }, failure: { (error) in
      // failure
    })
}
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-955-1" data-tab-group="tabgrp-955">

```Objective-C
- (void)messaging:(FIRMessaging *)messaging didReceiveRegistrationToken:(NSString *)fcmToken {
    [SNRClient registerForPush:fcmToken mobilePushAgreement:YES success:^() {
      // success
    } failure:^(SNRApiError * _Nonnull error) {
      // failure
    }];
}
```

</div>
</div>


## 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** |
| --- | --- | --- | --- | --- |
| <span style="color:green">Introduced in:</span> | 4.14.0 | 5.7.1 | 0.15.0 | 1.1.0 |


<div class="admonition admonition-note"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

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

</div></div></div>



<div class="admonition admonition-note"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

If the registration fails, the SDK requests a token update again by a listener/delegate method ([Android](/developers/mobile-sdk/listeners-and-delegates/android-listeners#on-register-for-push-listener), [iOS](/developers/mobile-sdk/listeners-and-delegates/ios-delegates#synerise-delegate-register-for-push-notifications-is-needed), [React Native](/developers/mobile-sdk/listeners-and-delegates/react-native-listeners#notifications-listener), [Flutter](/developers/mobile-sdk/listeners-and-delegates/flutter-listeners#notifications-listener)).

</div></div></div>

**Declared In:**  
Headers/SNRClient.h
  
**Class:**  
[Client](/developers/mobile-sdk/class-reference/ios/modules#client)
  
**Declaration:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-956">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-956-0" data-tab-group="tabgrp-956" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-956-1" data-tab-group="tabgrp-956">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-956-0" data-tab-group="tabgrp-956" data-tab-active="true">

```Swift
static func registerForPush(registrationToken: String, success: (() -> Void), failure: ((ApiError) -> Void)) -> Void
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-956-1" data-tab-group="tabgrp-956">

```Objective-C
+ (void)registerForPush:(nonnull NSString *)registrationToken success:(nonnull void (^)(void))success failure:(nonnull void (^)(SNRApiError *error))failure
```

</div>
</div>

  
**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](/developers/mobile-sdk/class-reference/ios/miscellaneous#snrapierror)) -> Void) | yes | - | Closure/Block to be executed when the operation is completed with an error |
  

<div class="admonition admonition-note"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

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

</div></div></div>

  
**Return Value:**  
No value is returned.
  
**Example:**

<div class="content-tabs code-tabs" data-tab-group="tabgrp-957">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-957-0" data-tab-group="tabgrp-957" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-957-1" data-tab-group="tabgrp-957">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-957-0" data-tab-group="tabgrp-957" data-tab-active="true">

```Swift
func messaging(_ messaging: Messaging, didReceiveRegistrationToken fcmToken: String) {
    Client.registerForPush(registrationToken: fcmToken, success: {
      // success
    }, failure: { (error) in
      // failure
    })
}
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-957-1" data-tab-group="tabgrp-957">

```Objective-C
- (void)messaging:(FIRMessaging *)messaging didReceiveRegistrationToken:(NSString *)fcmToken {
    [SNRClient registerForPush:fcmToken success:^() {
      // success
    } failure:^(SNRApiError * _Nonnull error) {
      // failure
    }];
}
```

</div>
</div>


## Check if push notification is from Synerise
---
This method verifies if a notification was sent by Synerise.
**Declared In:**  
Headers/SNRSynerise.h
  
**Class:**  
[Synerise](/developers/mobile-sdk/class-reference/ios/modules#synerise)
  
**Declaration:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-958">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-958-0" data-tab-group="tabgrp-958" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-958-1" data-tab-group="tabgrp-958">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-958-0" data-tab-group="tabgrp-958" data-tab-active="true">

```Swift
static func isSyneriseNotification(_ userInfo: [AnyHashable: Any]) -> Bool
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-958-1" data-tab-group="tabgrp-958">

```Objective-C
+ (BOOL)isSyneriseNotification:(nonnull NSDictionary *)userInfo
```

</div>
</div>

  
**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:**

<div class="content-tabs code-tabs" data-tab-group="tabgrp-959">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-959-0" data-tab-group="tabgrp-959" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-959-1" data-tab-group="tabgrp-959">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-959-0" data-tab-group="tabgrp-959" data-tab-active="true">

```Swift
//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
        }
    }
}
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-959-1" data-tab-group="tabgrp-959">

```Objective-C
#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
    }
}
```

</div>
</div>


## 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](/developers/mobile-sdk/class-reference/ios/modules#synerise)
  
**Declaration:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-960">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-960-0" data-tab-group="tabgrp-960" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-960-1" data-tab-group="tabgrp-960">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-960-0" data-tab-group="tabgrp-960" data-tab-active="true">

```Swift
static func isSyneriseSimplePush(_ userInfo: [AnyHashable: Any]) -> Bool
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-960-1" data-tab-group="tabgrp-960">

```Objective-C
+ (BOOL)isSyneriseSimplePush:(nonnull NSDictionary *)userInfo;
```

</div>
</div>

  
**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:**

<div class="content-tabs code-tabs" data-tab-group="tabgrp-961">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-961-0" data-tab-group="tabgrp-961" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-961-1" data-tab-group="tabgrp-961">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-961-0" data-tab-group="tabgrp-961" data-tab-active="true">

```Swift
//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
            }
        }
    }
}
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-961-1" data-tab-group="tabgrp-961">

```Objective-C
#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
        }
    }
}
```

</div>
</div>


## 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](/developers/mobile-sdk/class-reference/ios/modules#synerise)
  
**Declaration:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-962">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-962-0" data-tab-group="tabgrp-962" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-962-1" data-tab-group="tabgrp-962">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-962-0" data-tab-group="tabgrp-962" data-tab-active="true">

```Swift
static func isSyneriseSilentCommand(_ userInfo: [AnyHashable: Any]) -> Bool
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-962-1" data-tab-group="tabgrp-962">

```Objective-C
+ (BOOL)isSyneriseSilentCommand:(nonnull NSDictionary *)userInfo;
```

</div>
</div>

  
**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:**

<div class="content-tabs code-tabs" data-tab-group="tabgrp-963">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-963-0" data-tab-group="tabgrp-963" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-963-1" data-tab-group="tabgrp-963">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-963-0" data-tab-group="tabgrp-963" data-tab-active="true">

```Swift
//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
            }
        }
    }
}
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-963-1" data-tab-group="tabgrp-963">

```Objective-C
#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
        }
    }
}
```

</div>
</div>


## 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](/developers/mobile-sdk/class-reference/ios/modules#synerise)
  
**Declaration:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-964">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-964-0" data-tab-group="tabgrp-964" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-964-1" data-tab-group="tabgrp-964">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-964-0" data-tab-group="tabgrp-964" data-tab-active="true">

```Swift
static func isSyneriseSilentSDKCommand(_ userInfo: [AnyHashable: Any]) -> Bool
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-964-1" data-tab-group="tabgrp-964">

```Objective-C
+ (BOOL)isSyneriseSilentSDKCommand:(nonnull NSDictionary *)userInfo;
```

</div>
</div>

  
**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:**

<div class="content-tabs code-tabs" data-tab-group="tabgrp-965">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-965-0" data-tab-group="tabgrp-965" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-965-1" data-tab-group="tabgrp-965">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-965-0" data-tab-group="tabgrp-965" data-tab-active="true">

```Swift
//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
            }
        }
    }
}
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-965-1" data-tab-group="tabgrp-965">

```Objective-C
#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
        }
    }
}
```

</div>
</div>


## Check if push notification is encrypted
---
This method verifies if a notification is encrypted.
**Declared In:**  
Headers/SNRSynerise.h
    
**Class:**  
[Synerise](/developers/mobile-sdk/class-reference/ios/modules#synerise)
  
**Declaration:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-966">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-966-0" data-tab-group="tabgrp-966" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-966-1" data-tab-group="tabgrp-966">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-966-0" data-tab-group="tabgrp-966" data-tab-active="true">

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

</div>

<div class="tab-panel" data-tab-id="tabgrp-966-1" data-tab-group="tabgrp-966">

```Objective-C
+ (BOOL)isNotificationEncrypted:(nonnull NSDictionary *)userInfo
```

</div>
</div>

  
**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:**

<div class="content-tabs code-tabs" data-tab-group="tabgrp-967">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-967-0" data-tab-group="tabgrp-967" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-967-1" data-tab-group="tabgrp-967">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-967-0" data-tab-group="tabgrp-967" data-tab-active="true">

```Swift
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
        }
    }
    //...
}
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-967-1" data-tab-group="tabgrp-967">

```Objective-C
- (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
        }
    }
}
```

</div>
</div>


## Decrypt push notification
---
This method decrypts the notification payload.
  

<div class="admonition admonition-note"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

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

</div></div></div>
  
  

<div class="admonition admonition-note"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

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

</div></div></div>

**Declared In:**  
Headers/SNRSynerise.h
  
**Class:**  
[Synerise](/developers/mobile-sdk/class-reference/ios/modules#synerise)
  
**Declaration:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-968">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-968-0" data-tab-group="tabgrp-968" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-968-1" data-tab-group="tabgrp-968">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-968-0" data-tab-group="tabgrp-968" data-tab-active="true">

```Swift
static func decryptNotification(_ userInfo: [AnyHashable: Any]) -> Void
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-968-1" data-tab-group="tabgrp-968">

```Objective-C
+ (nullable NSDictionary *)decryptNotification:(nonnull NSDictionary *)userInfo
```

</div>
</div>



**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:**

<div class="content-tabs code-tabs" data-tab-group="tabgrp-969">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-969-0" data-tab-group="tabgrp-969" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-969-1" data-tab-group="tabgrp-969">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-969-0" data-tab-group="tabgrp-969" data-tab-active="true">

```Swift
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
            }
        }
    }
    //...
}
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-969-1" data-tab-group="tabgrp-969">

```Objective-C
- (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
            }
        }
    }
}
```

</div>
</div>


## Handle Synerise push notification
---
This method handles a notification payload and starts activity.
**Declared In:**  
Headers/SNRSynerise.h
  
**Class:**  
[Synerise](/developers/mobile-sdk/class-reference/ios/modules#synerise)

**Declaration:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-970">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-970-0" data-tab-group="tabgrp-970" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-970-1" data-tab-group="tabgrp-970">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-970-0" data-tab-group="tabgrp-970" data-tab-active="true">

```Swift
static func handleNotification(_ userInfo: [AnyHashable: Any]) -> Void
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-970-1" data-tab-group="tabgrp-970">

```Objective-C
+ (void)handleNotification:(nonnull NSDictionary *)userInfo;
```

</div>
</div>

  
**Parameters:**  
| Parameter | Type | Mandatory | Default | Description |
| --- | --- | --- | --- | --- |
| **userInfo** | [AnyHashable: Any] | yes | - | Key-Value map of data |
  
**Return Value:**  
No value is returned.
  
**Example:**

<div class="content-tabs code-tabs" data-tab-group="tabgrp-971">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-971-0" data-tab-group="tabgrp-971" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-971-1" data-tab-group="tabgrp-971">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-971-0" data-tab-group="tabgrp-971" data-tab-active="true">

```Swift
//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)
        }
    }
}
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-971-1" data-tab-group="tabgrp-971">

```Objective-C
#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];
    }
}
```

</div>
</div>


## 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](/developers/mobile-sdk/class-reference/ios/modules#synerise)
  
**Declaration:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-972">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-972-0" data-tab-group="tabgrp-972" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-972-1" data-tab-group="tabgrp-972">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-972-0" data-tab-group="tabgrp-972" data-tab-active="true">

```Swift
static func handleNotification(_ userInfo: [AnyHashable: Any], actionIdentifier: String?) -> Void
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-972-1" data-tab-group="tabgrp-972">

```Objective-C
+ (void)handleNotification:(nonnull NSDictionary *)userInfo actionIdentifier:(nullable NSString *)actionIdentifier
```

</div>
</div>

  
**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:**

<div class="content-tabs code-tabs" data-tab-group="tabgrp-973">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-973-0" data-tab-group="tabgrp-973" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-973-1" data-tab-group="tabgrp-973">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-973-0" data-tab-group="tabgrp-973" data-tab-active="true">

```Swift
//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)
        }
    }
}
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-973-1" data-tab-group="tabgrp-973">

```Objective-C
#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];
    }
}
```

</div>
</div>


## Removed methods

### <del>Check if push notification is a Banner Campaign</del> {#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** |
| --- | --- | --- | --- | --- |
| <span style="color:red">Removed in:</span> | 5.0.0 | 6.0.0 | 1.0.0 | n/a |
**Declared In:**  
Headers/SNRSynerise.h
  
**Class:**  
[Synerise](/developers/mobile-sdk/class-reference/ios/modules#synerise)
  
**Declaration:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-974">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-974-0" data-tab-group="tabgrp-974" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-974-1" data-tab-group="tabgrp-974">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-974-0" data-tab-group="tabgrp-974" data-tab-active="true">

```Swift
static func isSyneriseBanner(_ userInfo: [AnyHashable: Any]) -> Bool
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-974-1" data-tab-group="tabgrp-974">

```Objective-C
+ (BOOL)isSyneriseBanner:(nonnull NSDictionary *)userInfo;
```

</div>
</div>

  
**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:**

<div class="content-tabs code-tabs" data-tab-group="tabgrp-975">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-975-0" data-tab-group="tabgrp-975" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-975-1" data-tab-group="tabgrp-975">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-975-0" data-tab-group="tabgrp-975" data-tab-active="true">

```Swift
//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
            }
        }
    }
}
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-975-1" data-tab-group="tabgrp-975">

```Objective-C
#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
        }
    }
}
```

</div>
</div>


### <del>Fetch Banners</del> {#fetch-banners}
---
This method fetches banners set for mobile campaigns and caches the valid ones.
  
| | **iOS SDK** | **Android SDK** | **React Native SDK** | **Flutter SDK** |
| --- | --- | --- | --- | --- |
| <span style="color:red">Removed in:</span> | 4.6.0 | 4.7.0 | 0.12.0 | n/a |
**Declared In:**  
Headers/SNRInjector.h  
  
**Class:**  
[Injector](/developers/mobile-sdk/class-reference/ios/modules#injector)
  
**Declaration:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-976">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-976-0" data-tab-group="tabgrp-976" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-976-1" data-tab-group="tabgrp-976">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-976-0" data-tab-group="tabgrp-976" data-tab-active="true">

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

</div>

<div class="tab-panel" data-tab-id="tabgrp-976-1" data-tab-group="tabgrp-976">

```Objective-C
+ (void)fetchBannersWithSuccess:(void (^)(NSArray<NSDictionary *> *banners))success failure:(void (^)(NSError *error))failure
```

</div>
</div>

  
**Parameters:**  
| Parameter | Type | Mandatory | Default | Description |
| --- | --- | --- | --- | --- |
| **success** | (([[AnyHashable: Any]]) -> Void) | yes | - | Closure/Block to be executed when the operation is completed successfully |
| **failure** | (([ApiError](/developers/mobile-sdk/class-reference/ios/miscellaneous#snrapierror)) -> Void) | yes | - | Closure/Block to be executed when the operation is completed with an error |
  
**Return Value:**  
No value is returned.

### <del>Get Banners</del> {#get-banners}
---
This method provides valid banners directly from SDK cache.
  
| | **iOS SDK** | **Android SDK** | **React Native SDK** | **Flutter SDK** |
| --- | --- | --- | --- | --- |
| <span style="color:red">Removed in:</span> | 4.6.0 | 4.7.0 | 0.12.0 | n/a |
**Declared In:**  
Headers/SNRInjector.h  
  
**Class:**  
[Injector](/developers/mobile-sdk/class-reference/ios/modules#injector)
  
**Declaration:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-977">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-977-0" data-tab-group="tabgrp-977" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-977-1" data-tab-group="tabgrp-977">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-977-0" data-tab-group="tabgrp-977" data-tab-active="true">

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

</div>

<div class="tab-panel" data-tab-id="tabgrp-977-1" data-tab-group="tabgrp-977">

```Objective-C
+ (NSArray<NSDictionary *> *)getBanners
```

</div>
</div>

  
**Return Value:**  
List of structures that represents cached Banners.

### <del>Show Banner</del> {#show-banner}
---
This method shows a banner immediately.
  
| | **iOS SDK** | **Android SDK** | **React Native SDK** | **Flutter SDK** |
| --- | --- | --- | --- | --- |
| <span style="color:red">Removed in:</span> | 4.6.0 | 4.7.0 | 0.12.0 | - |
**Declared In:**  
Headers/SNRInjector.h
  
**Class:**  
[Injector](/developers/mobile-sdk/class-reference/ios/modules#injector)
  
**Declaration:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-978">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-978-0" data-tab-group="tabgrp-978" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-978-1" data-tab-group="tabgrp-978">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-978-0" data-tab-group="tabgrp-978" data-tab-active="true">

```Swift
static func showBanner(_: [AnyHashable: Any], markPresented: Bool) -> Void
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-978-1" data-tab-group="tabgrp-978">

```Objective-C
+ (void)showBanner:(NSDictionary *)bannerDictionary markPresented:(BOOL)markPresented
```

</div>
</div>

  
**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.

### <del>Get Walkthrough</del> {#get-walkthrough}
---
This method fetches a walkthrough.

| | **iOS SDK** | **Android SDK** | **React Native SDK** | **Flutter SDK** |
| --- | --- | --- | --- | --- |
| <span style="color:red">Removed in:</span> | 5.0.0 | 6.0.0 | 1.0.0 | 2.0.0 |


<div class="admonition admonition-note"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

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

</div></div></div>

**Declared In:**  
Headers/SNRInjector.h
  
**Class:**  
[Injector](/developers/mobile-sdk/class-reference/ios/modules#injector)
  
**Declaration:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-979">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-979-0" data-tab-group="tabgrp-979" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-979-1" data-tab-group="tabgrp-979">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-979-0" data-tab-group="tabgrp-979" data-tab-active="true">

```Swift
static func getWalkthrough() -> Void
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-979-1" data-tab-group="tabgrp-979">

```Objective-C
+ (void)getWalkthrough
```

</div>
</div>

  
**Return Value:**  
No value is returned.

### <del>Show Walkthrough</del> {#show-walkthrough}
---
This method shows a walkthrough when it is loaded.

| | **iOS SDK** | **Android SDK** | **React Native SDK** | **Flutter SDK** |
| --- | --- | --- | --- | --- |
| <span style="color:red">Removed in:</span> | 5.0.0 | 6.0.0 | 1.0.0 | 2.0.0 |
**Declared In:**  
Headers/SNRInjector.h
  
**Class:**  
[Injector](/developers/mobile-sdk/class-reference/ios/modules#injector)
  
**Declaration:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-980">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-980-0" data-tab-group="tabgrp-980" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-980-1" data-tab-group="tabgrp-980">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-980-0" data-tab-group="tabgrp-980" data-tab-active="true">

```Swift
static func showWalkthrough() -> Void
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-980-1" data-tab-group="tabgrp-980">

```Objective-C
+ (void)showWalkthrough
```

</div>
</div>

  
**Return Value:**  
No value is returned.

### <del>Check if Walkthrough is loaded</del> {#check-if-walkthrough-is-loaded}
---
This method checks if a walkthrough is loaded.

| | **iOS SDK** | **Android SDK** | **React Native SDK** | **Flutter SDK** |
| --- | --- | --- | --- | --- |
| <span style="color:red">Removed in:</span> | 5.0.0 | 6.0.0 | 1.0.0 | 2.0.0 |
**Declared In:**  
Headers/SNRInjector.h
  
**Class:**  
[Injector](/developers/mobile-sdk/class-reference/ios/modules#injector)
  
**Declaration:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-981">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-981-0" data-tab-group="tabgrp-981" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-981-1" data-tab-group="tabgrp-981">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-981-0" data-tab-group="tabgrp-981" data-tab-active="true">

```Swift
static func isWalkthroughLoaded() -> Bool
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-981-1" data-tab-group="tabgrp-981">

```Objective-C
+ (BOOL)isWalkthroughLoaded
```

</div>
</div>

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

### <del>Check if loaded Walkthrough is unique</del> {#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** |
| --- | --- | --- | --- | --- |
| <span style="color:red">Removed in:</span> | 5.0.0 | 6.0.0 | 1.0.0 | 2.0.0 |
**Declared In:**  
Headers/SNRInjector.h
  
**Class:**  
[Injector](/developers/mobile-sdk/class-reference/ios/modules#injector)
  
**Declaration:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-982">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-982-0" data-tab-group="tabgrp-982" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-982-1" data-tab-group="tabgrp-982">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-982-0" data-tab-group="tabgrp-982" data-tab-active="true">

```Swift
static func isLoadedWalkthroughUnique() -> Bool
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-982-1" data-tab-group="tabgrp-982">

```Objective-C
+ (BOOL)isLoadedWalkthroughUnique
```

</div>
</div>

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

### <del>Get pushes</del> {#get-pushes}
---
This method fetches Push Notifications set for mobile campaigns.

| | **iOS SDK** | **Android SDK** | **React Native SDK** | **Flutter SDK** |
| --- | --- | --- | --- | --- |
| <span style="color:red">Removed in:</span> | 5.0.0 | 6.0.0 | n/a | n/a |


<div class="admonition admonition-note"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

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

</div></div></div>

**Declared In:**  
Headers/SNRInjector.h
  
**Class:**  
[Injector](/developers/mobile-sdk/class-reference/ios/modules#injector)
  
**Declaration:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-983">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-983-0" data-tab-group="tabgrp-983" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-983-1" data-tab-group="tabgrp-983">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-983-0" data-tab-group="tabgrp-983" data-tab-active="true">

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

</div>

<div class="tab-panel" data-tab-id="tabgrp-983-1" data-tab-group="tabgrp-983">

```Objective-C
+ (void)getPushesWithSuccess:(void (^)(NSArray<NSDictionary *> *pushes))success failure:(void (^)(NSError *error))failure
```

</div>
</div>

  
**Parameters:**  
| Parameter | Type | Mandatory | Default | Description |
| --- | --- | --- | --- | --- |
| **success** | (([[AnyHashable: Any]]) -> Void) | yes | - | Closure/Block to be executed when the operation is completed successfully |
| **failure** | (([ApiError](/developers/mobile-sdk/class-reference/ios/miscellaneous#snrapierror)) -> Void) | yes | - | Closure/Block to be executed when the operation is completed with an error |
  
**Return Value:**  
No value is returned.
