
## 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-1003">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1003-0" data-tab-group="tabgrp-1003" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-1003-1" data-tab-group="tabgrp-1003">Objective-C</button></div>

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

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

</div>

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

```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-1004">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1004-0" data-tab-group="tabgrp-1004" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-1004-1" data-tab-group="tabgrp-1004">Objective-C</button></div>

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

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

</div>

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

```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-1005">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1005-0" data-tab-group="tabgrp-1005" data-tab-active="true">swift</button><button class="tab-button" data-tab-id="tabgrp-1005-1" data-tab-group="tabgrp-1005">objective-c</button></div>

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

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

</div>

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

```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 Inline In-App Message delegate
---
This method sets an object for inline in-app message campaigns delegate methods.
**Declared In:**  
Headers/SNRInjector.h
  
**Related To:**  
[InjectorInlineInAppMessageDelegate](/developers/mobile-sdk/listeners-and-delegates/ios-delegates#injector-inline-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-1006">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1006-0" data-tab-group="tabgrp-1006" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-1006-1" data-tab-group="tabgrp-1006">Objective-C</button></div>

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

```Swift
static func setInlineInAppMessageDelegate(_ delegate: InjectorInlineInAppMessageDelegate)
```

</div>

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

```Objective-C
+ (void)setInlineInAppMessageDelegate:(id<SNRInjectorInlineInAppMessageDelegate>)delegate
```

</div>
</div>

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

## Create Inline In-App view
---
Creates an inline in-app message view for a given placement key. The returned view must be embedded into the app's view hierarchy by the application.
**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-1007">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1007-0" data-tab-group="tabgrp-1007" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-1007-1" data-tab-group="tabgrp-1007">Objective-C</button></div>

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

```Swift
static func createInlineInAppView(placementKey: String) -> InlineInAppView?
```

</div>

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

```Objective-C
+ (nullable SNRInlineInAppView *)createInlineInAppViewWithPlacementKey:(nonnull NSString *)placementKey
```

</div>
</div>


**Parameters:**  
| Parameter | Type | Mandatory | Default | Description |
| --- | --- | --- | --- | --- |
| **placementKey** | String | yes | - | Identifier of the placement configured in the Synerise platform |

## Notify In-App context change
---
Notifies all active in-app message components that the global context has changed. After this call, the SDK invokes `SRInApp.onContextFromApp(context)` in each active in-app message.
**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-1008">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1008-0" data-tab-group="tabgrp-1008" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-1008-1" data-tab-group="tabgrp-1008">Objective-C</button></div>

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

```Swift
static func notifyInAppContextChange()
```

</div>

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

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

</div>
</div>


## Get Inline In-App view identifier
---
Returns the free-form identifier attached to this view by the application. Not used by the SDK.
**Declared In:**  
Headers/SNRInlineInAppView.h

**Declaration:**  

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

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

```Swift
func getIdentifier() -> String?
```

</div>

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

```Objective-C
- (nullable NSString *)getIdentifier
```

</div>
</div>


## Set Inline In-App view identifier
---
Sets a free-form identifier on the view. The identifier is not used by the SDK — it exists so the application can tell multiple `InlineInAppView` instances apart.
**Declared In:**  
Headers/SNRInlineInAppView.h

**Declaration:**  

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

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

```Swift
func setIdentifier(_ identifier: String)
```

</div>

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

```Objective-C
- (void)setIdentifier:(nonnull NSString *)identifier
```

</div>
</div>


## Check if Inline In-App view is rendered
---
Returns whether an inline in-app message campaign is currently rendered in this view.
**Declared In:**  
Headers/SNRInlineInAppView.h

**Declaration:**  

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

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

```Swift
func isRendered() -> Bool
```

</div>

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

```Objective-C
- (BOOL)isRendered
```

</div>
</div>


## Get Inline In-App view placement key
---
Returns the placement key this view is bound to.
**Declared In:**  
Headers/SNRInlineInAppView.h

**Declaration:**  

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

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

```Swift
func getPlacementKey() -> String
```

</div>

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

```Objective-C
- (nonnull NSString *)getPlacementKey
```

</div>
</div>


## Render Inline In-App view
---
Triggers on-demand rendering of content in an inline in-app view. Use this method when the campaign trigger type is set to "on demand".
**Declared In:**  
Headers/SNRInlineInAppView.h

**Declaration:**  

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

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

```Swift
func render()
```

</div>

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

```Objective-C
- (void)render
```

</div>
</div>


## Get Inline In-App view data
---
Returns the data of the currently loaded inline in-app message campaign.
**Declared In:**  
Headers/SNRInlineInAppView.h

**Declaration:**  

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

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

```Swift
func getData() -> InlineInAppMessageData?
```

</div>

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

```Objective-C
- (nullable SNRInlineInAppMessageData *)getData
```

</div>
</div>


## 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-1015">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1015-0" data-tab-group="tabgrp-1015" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-1015-1" data-tab-group="tabgrp-1015">Objective-C</button></div>

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

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

</div>

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

```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-1016">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1016-0" data-tab-group="tabgrp-1016" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-1016-1" data-tab-group="tabgrp-1016">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-1016-0" data-tab-group="tabgrp-1016" 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-1016-1" data-tab-group="tabgrp-1016">

```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-1017">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1017-0" data-tab-group="tabgrp-1017" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-1017-1" data-tab-group="tabgrp-1017">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-1017-0" data-tab-group="tabgrp-1017" 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-1017-1" data-tab-group="tabgrp-1017">

```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-1018">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1018-0" data-tab-group="tabgrp-1018" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-1018-1" data-tab-group="tabgrp-1018">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-1018-0" data-tab-group="tabgrp-1018" 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-1018-1" data-tab-group="tabgrp-1018">

```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-1019">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1019-0" data-tab-group="tabgrp-1019" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-1019-1" data-tab-group="tabgrp-1019">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-1019-0" data-tab-group="tabgrp-1019" 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-1019-1" data-tab-group="tabgrp-1019">

```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-1020">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1020-0" data-tab-group="tabgrp-1020" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-1020-1" data-tab-group="tabgrp-1020">Objective-C</button></div>

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

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

</div>

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

```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-1021">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1021-0" data-tab-group="tabgrp-1021" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-1021-1" data-tab-group="tabgrp-1021">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-1021-0" data-tab-group="tabgrp-1021" 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-1021-1" data-tab-group="tabgrp-1021">

```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-1022">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1022-0" data-tab-group="tabgrp-1022" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-1022-1" data-tab-group="tabgrp-1022">Objective-C</button></div>

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

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

</div>

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

```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-1023">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1023-0" data-tab-group="tabgrp-1023" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-1023-1" data-tab-group="tabgrp-1023">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-1023-0" data-tab-group="tabgrp-1023" 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-1023-1" data-tab-group="tabgrp-1023">

```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-1024">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1024-0" data-tab-group="tabgrp-1024" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-1024-1" data-tab-group="tabgrp-1024">Objective-C</button></div>

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

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

</div>

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

```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-1025">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1025-0" data-tab-group="tabgrp-1025" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-1025-1" data-tab-group="tabgrp-1025">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-1025-0" data-tab-group="tabgrp-1025" 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-1025-1" data-tab-group="tabgrp-1025">

```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-1026">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1026-0" data-tab-group="tabgrp-1026" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-1026-1" data-tab-group="tabgrp-1026">Objective-C</button></div>

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

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

</div>

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

```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-1027">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1027-0" data-tab-group="tabgrp-1027" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-1027-1" data-tab-group="tabgrp-1027">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-1027-0" data-tab-group="tabgrp-1027" 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-1027-1" data-tab-group="tabgrp-1027">

```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-1028">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1028-0" data-tab-group="tabgrp-1028" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-1028-1" data-tab-group="tabgrp-1028">Objective-C</button></div>

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

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

</div>

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

```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-1029">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1029-0" data-tab-group="tabgrp-1029" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-1029-1" data-tab-group="tabgrp-1029">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-1029-0" data-tab-group="tabgrp-1029" 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-1029-1" data-tab-group="tabgrp-1029">

```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-1030">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1030-0" data-tab-group="tabgrp-1030" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-1030-1" data-tab-group="tabgrp-1030">Objective-C</button></div>

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

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

</div>

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

```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-1031">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1031-0" data-tab-group="tabgrp-1031" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-1031-1" data-tab-group="tabgrp-1031">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-1031-0" data-tab-group="tabgrp-1031" 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-1031-1" data-tab-group="tabgrp-1031">

```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-1032">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1032-0" data-tab-group="tabgrp-1032" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-1032-1" data-tab-group="tabgrp-1032">Objective-C</button></div>

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

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

</div>

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

```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-1033">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1033-0" data-tab-group="tabgrp-1033" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-1033-1" data-tab-group="tabgrp-1033">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-1033-0" data-tab-group="tabgrp-1033" 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-1033-1" data-tab-group="tabgrp-1033">

```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-1034">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1034-0" data-tab-group="tabgrp-1034" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-1034-1" data-tab-group="tabgrp-1034">Objective-C</button></div>

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

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

</div>

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

```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-1035">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1035-0" data-tab-group="tabgrp-1035" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-1035-1" data-tab-group="tabgrp-1035">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-1035-0" data-tab-group="tabgrp-1035" 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-1035-1" data-tab-group="tabgrp-1035">

```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-1036">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1036-0" data-tab-group="tabgrp-1036" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-1036-1" data-tab-group="tabgrp-1036">Objective-C</button></div>

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

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

</div>

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

```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-1037">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1037-0" data-tab-group="tabgrp-1037" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-1037-1" data-tab-group="tabgrp-1037">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-1037-0" data-tab-group="tabgrp-1037" 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-1037-1" data-tab-group="tabgrp-1037">

```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-1038">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1038-0" data-tab-group="tabgrp-1038" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-1038-1" data-tab-group="tabgrp-1038">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-1038-0" data-tab-group="tabgrp-1038" 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-1038-1" data-tab-group="tabgrp-1038">

```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-1039">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1039-0" data-tab-group="tabgrp-1039" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-1039-1" data-tab-group="tabgrp-1039">Objective-C</button></div>

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

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

</div>

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

```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-1040">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1040-0" data-tab-group="tabgrp-1040" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-1040-1" data-tab-group="tabgrp-1040">Objective-C</button></div>

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

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

</div>

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

```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-1041">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1041-0" data-tab-group="tabgrp-1041" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-1041-1" data-tab-group="tabgrp-1041">Objective-C</button></div>

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

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

</div>

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

```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-1042">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1042-0" data-tab-group="tabgrp-1042" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-1042-1" data-tab-group="tabgrp-1042">Objective-C</button></div>

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

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

</div>

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

```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-1043">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1043-0" data-tab-group="tabgrp-1043" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-1043-1" data-tab-group="tabgrp-1043">Objective-C</button></div>

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

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

</div>

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

```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-1044">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1044-0" data-tab-group="tabgrp-1044" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-1044-1" data-tab-group="tabgrp-1044">Objective-C</button></div>

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

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

</div>

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

```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-1045">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1045-0" data-tab-group="tabgrp-1045" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-1045-1" data-tab-group="tabgrp-1045">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-1045-0" data-tab-group="tabgrp-1045" 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-1045-1" data-tab-group="tabgrp-1045">

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