
## Prerequisites
---
Only for campaigns served by push notifications: [Configure push notifications](/developers/mobile-sdk/configuring-push-notifications).

## Overview
---
Synerise campaigns are served in two ways:
- By Push Notifications, which means that the campaigns are delivered as a push notification:
  - Simple push
  - Silent push

- By Synerise backend, which means that the campaign is retrieved by SDK through API:
  - In-app messages


   <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 can create each campaign type in the Synerise app. [Full documentation is available at this link](/docs/campaign/Mobile).

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


## Synerise push notification structure
---
Each notification follows this basic structure corresponding to the operating system:


<div class="content-tabs" data-tab-group="tabgrp-23">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-23-0" data-tab-group="tabgrp-23" data-tab-active="true">Android</button><button class="tab-button" data-tab-id="tabgrp-23-1" data-tab-group="tabgrp-23">iOS</button></div>

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

<pre><code class="language-json">{
  "data": {
    "issuer": "Synerise",
    "message-type": "static-content",
    "content-type": "simple-push",
    "content": {
      &lt;&lt;campaign content&gt;&gt;
    }
  }
}</code></pre>

</div>

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

<pre><code class="language-json">{
  "aps": {
    &lt;&lt;Apple params for iOS notification&gt;&gt;
  },    
  "issuer": "Synerise",
  "message-type": "static-content",
  "content-type": "simple-push",
  "content": {
    &lt;&lt;campaign content&gt;&gt;
  }
}</code></pre>

</div>
</div>


- `issuer` - in Synerise notifications, the issuer is always `Synerise`. If you want to handle notifications with your own methods, remember to change the `issuer` field. If `issuer` is set to `Synerise`, the payload is always handled by the Synerise SDK.
- `message-type` - specifies if the content is static or dynamic.
- `content-type` - specifies the type of content in the payload.
- `content` - the content of the message.

You can also react to Synerise push notifications in your own way, using the payloads presented earlier in this article.


## Checking push campaign type
---
You may need to know whether an incoming push notification comes from Synerise.


<div class="content-tabs" data-tab-group="tabgrp-24">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-24-0" data-tab-group="tabgrp-24" data-tab-active="true">Android</button><button class="tab-button" data-tab-id="tabgrp-24-1" data-tab-group="tabgrp-24">iOS</button><button class="tab-button" data-tab-id="tabgrp-24-2" data-tab-group="tabgrp-24">React Native</button><button class="tab-button" data-tab-id="tabgrp-24-3" data-tab-group="tabgrp-24">Flutter</button></div>

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

| Method | Description |
| --- | --- |
| [`Injector.isSynerisePush`](/developers/mobile-sdk/method-reference/android/campaigns#check-if-push-notification-is-from-synerise) | Returns 'true' if the notification comes from Synerise.<br/>It is validated by checking if the `issuer` of the push is `Synerise`. |
| [`Injector.isSyneriseSimplePush`](/developers/mobile-sdk/method-reference/android/campaigns#check-if-push-notification-is-a-simple-push-campaign) | Checks if the notification payload contains a Simple Push campaign. |
| [`Injector.isSyneriseBanner`](/developers/mobile-sdk/method-reference/android/campaigns#check-if-push-notification-is-a-banner-campaign) | Checks if the notification payload contains a Banner campaign. |
| [`Injector.isSyneriseSilentCommand`](/developers/mobile-sdk/method-reference/android/campaigns#check-if-push-notification-is-a-silent-command) | Checks if the notification payload contains a Silent Command campaign. |
| [`Injector.isSilentSdkCommand`](/developers/mobile-sdk/method-reference/android/campaigns#check-if-push-notification-is-a-silent-sdk-command) | Checks if the notification payload contains a Silent SDK Command campaign. |

</div>

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

| Method | Description |
| --- | --- |
| [`Synerise.isSyneriseNotification`](/developers/mobile-sdk/method-reference/ios/campaigns#check-if-push-notification-is-from-synerise) | Returns 'true' if the notification comes from Synerise.<br/>It is validated by checking if the `issuer` of the push is `Synerise`. |
| [`Synerise.isSyneriseSimplePush`](/developers/mobile-sdk/method-reference/ios/campaigns#check-if-push-notification-is-a-simple-push-campaign) | Checks if the notification payload contains a Simple Push campaign. |
| [`Injector.isSyneriseBanner`](/developers/mobile-sdk/method-reference/ios/campaigns#check-if-push-notification-is-a-banner-campaign) | | [`Synerise.isSyneriseBanner`](/developers/mobile-sdk/method-reference/ios/campaigns#check-if-push-notification-is-a-banner-campaign) | Checks if the notification payload contains a Banner campaign. |
| [`Synerise.isSilentCommand`](/developers/mobile-sdk/method-reference/ios/campaigns#check-if-push-notification-is-a-silent-command) | Checks if the notification payload contains a Silent Command campaign. |
| [`Synerise.isSyneriseSilentSDKCommand`](/developers/mobile-sdk/method-reference/ios/campaigns#check-if-push-notification-is-a-silent-sdk-command) | Checks if the notification payload contains a Silent SDK Command campaign. |

</div>

<div class="tab-panel" data-tab-id="tabgrp-24-2" data-tab-group="tabgrp-24">

| Method | Description |
| --- | --- |
| [`Synerise.Notificationsl.isSyneriseNotification`](/developers/mobile-sdk/method-reference/react-native/campaigns#check-if-push-notification-is-from-synerise) | Returns 'true' if the notification comes from Synerise.<br/>It is validated by checking if the `issuer` of the push is `Synerise`. |
| [`Synerise.Notificationsl.isSyneriseSimplePush`](/developers/mobile-sdk/method-reference/react-native/campaigns#check-if-push-notification-is-a-simple-push-campaign) | Checks if the notification payload contains a Simple Push campaign. |
| [`Injector.isSyneriseBanner`](/developers/mobile-sdk/method-reference/react-native/campaigns#check-if-push-notification-is-a-banner-campaign) | | [`Synerise.Notificationsl.isSyneriseBanner`](/developers/mobile-sdk/method-reference/react-native/campaigns#check-if-push-notification-is-a-banner-campaign) | Checks if the notification payload contains a Banner campaign. |
| [`Synerise.Notificationsl.isSyneriseSilentCommand`](/developers/mobile-sdk/method-reference/react-native/campaigns#check-if-push-notification-is-a-silent-command) | Checks if the notification payload contains a Silent Command campaign. |
| [`Synerise.Notificationsl.isSyneriseSilentSDKCommand`](/developers/mobile-sdk/method-reference/react-native/campaigns#check-if-push-notification-is-a-silent-sdk-command) | Checks if the notification payload contains a Silent SDK Command campaign.|

</div>

<div class="tab-panel" data-tab-id="tabgrp-24-3" data-tab-group="tabgrp-24">

| Method | Description |
| --- | --- |
| [`Synerise.notifications.isSyneriseNotification`](/developers/mobile-sdk/method-reference/flutter/campaigns#check-if-push-notification-is-from-synerise) | Returns 'true' if the notification comes from Synerise.<br/>It is validated by checking if the `issuer` of the push is `Synerise`. |
| [`Synerise.notifications.isSyneriseSimplePush`](/developers/mobile-sdk/method-reference/flutter/campaigns#check-if-push-notification-is-a-simple-push-campaign) | Checks if the notification payload contains a Simple Push campaign. |
| [`Synerise.notifications.isSyneriseBanner`](/developers/mobile-sdk/method-reference/flutter/campaigns#check-if-push-notification-is-a-banner-campaign) | Checks if the notification payload contains a Banner campaign. |
| [`Synerise.notifications.isSilentCommand`](/developers/mobile-sdk/method-reference/flutter/campaigns#check-if-push-notification-is-a-silent-command) | Checks if the notification payload contains a Silent Command campaign. |
| [`Synerise.notifications.isSyneriseSilentSDKCommand`](/developers/mobile-sdk/method-reference/flutter/campaigns#check-if-push-notification-is-a-silent-sdk-command) | Checks if the notification payload contains a Silent SDK Command campaign. |

</div>
</div>


## Localizations in campaigns
---

<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">

This feature is currently available only for iOS SDK, React Native (iOS), and Flutter SDK (iOS).

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


You may set your localization to support different languages in your application - see ["Localize some strings occurring in the SDK"](/developers/mobile-sdk/settings#localize-some-strings-occurring-in-the-sdk) in the SDK Settings.

**Available keys:**  
- **CTA button** in the [in-app alert of the Simple Push campaign](/developers/mobile-sdk/campaigns/simple-push#additional-in-app-alert-when-simple-push-is-received).
- **dismiss button** in the [in-app alert of the Simple Push campaign](/developers/mobile-sdk/campaigns/simple-push#additional-in-app-alert-when-simple-push-is-received).


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

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

  ```Swift
  Synerise.settings.sdk.localizable = [
    SNR_LOCALIZABLE_STRING_KEY_OK: "Go in!",
    SNR_LOCALIZABLE_STRING_KEY_CANCEL: "Go out!"
  ];
  ```

  </div>

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

  ```Objective-C
  SNRSynerise.settings.sdk.localizable = @[
    SNR_LOCALIZABLE_STRING_KEY_OK: @"Go in!",
    SNR_LOCALIZABLE_STRING_KEY_CANCEL: @"Go out!"
  ];
  ```

  </div>

  <div class="tab-panel" data-tab-id="tabgrp-21-2" data-tab-group="tabgrp-21">

  ```JavaScript
  Synerise.Settings.sdk.localizable = {
    LocalizableStringKeyOK: "Go in!",
    LocalizableStringKeyCancel: "Go out!"
  };
  ```

  </div>

  <div class="tab-panel" data-tab-id="tabgrp-21-3" data-tab-group="tabgrp-21">

  ```Dart
  Synerise.settings.sdk.localizable = {
    Localizable.localizableStringKeyOk: "Go in!", 
    Localizable.localizableStringKeyCancel: "Go out!"
  };
  ```

  </div>
  </div>


## Blocking campaigns
---

<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">

This feature is available only for iOS SDK.

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


If you don't want to show any of the Synerise campaigns somewhere in your application or if there are View Controllers that should never be covered by Synerise activity (for example, banners), you can block the Synerise elements.

To do this, add the **SyneriseActivityNotAllowed** protocol in your View Controller declaration.

For example:


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

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

```Swift
class SampleViewController: UIViewController, SyneriseActivityNotAllowed {

}
```

</div>

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

```Objective-C
@interface SampleViewController: UIViewController <SNRSyneriseActivityNotAllowed>

@end
```

</div>
</div>


*When View Controller implements that protocol and Synerise tries to run an activity, the activity is skipped.*


























