Campaigns

SyneriseSource

iOS SDK Android SDK React Native SDK Flutter SDK
Introduced in: 5.0.0 6.0.0 0.18.0 0.8.0

Declared In:
Headers/SNRSyneriseSource.h

Declaration:

enum SyneriseSource: Int {
    simplePush,
    inAppMessage,
    inlineInAppMessage
}
typedef NS_ENUM(NSInteger, SNRSyneriseSource) {
    SNRSyneriseSourceSimplePush,
    SNRSyneriseSourceInAppMessage,
    SNRSyneriseSourceInlineInAppMessage
}


NotificationInfo

Declared In:
Headers/SNRNotificationInfo.h

Inherits From:
BaseModel

Declaration:

class NotificationInfo: BaseModel
@interface SNRNotificationInfo : SNRBaseModel

Properties:

Property Type Optional Description
campaignHashId String no Identifier of the notification campaign.
campaignTitle String no Identifier of the notification title.
payload [AnyHashable: Any] yes Payload of the notification.

IMPORTANT: All properties are read-only.



PushNotificationsRegistrationOrigin

Declared In:
Headers/SNRSynerise.h

Declaration:

enum PushNotificationsRegistrationOrigin: Int {
    .appStarted,
    .clientContextChange,
    .securityReason,
    .periodicJob
}
typedef NS_ENUM(NSUInteger, SNRPushNotificationsRegistrationOrigin) {
    SNRPushNotificationsRegistrationOriginAppStarted,
    SNRPushNotificationsRegistrationOriginClientContextChange,
    SNRPushNotificationsRegistrationOriginSecurityReason,
    SNRPushNotificationsRegistrationOriginPeriodicJob
}


InAppMessageData

Model representing an in-app message data.

WARNING: This is a read-only class and it is not meant to be instantiated directly.

Declared In:
Headers/SNRInAppMessageData.h

Inherits From:
BaseModel

Declaration:

class InAppMessageData: BaseModel
@interface SNRInAppMessageData : SNRBaseModel

Properties:

Property Type Optional Description
campaignHash String no Identifier of the in-app message campaign.
variantIdentifier String no Identifier of the in-app message campaign variant.
additionalParameters [String: String] yes Parameters additionally provided by the campaign.
isTest Bool no Specifies if the object is from a test campaign.

IMPORTANT: All properties are read-only.



InlineInAppMessageData

Model representing inline in-app message data.

WARNING: This is a read-only class and it is not meant to be instantiated directly.

Declared In:
Headers/SNRInlineInAppMessageData.h

Inherits From:
BaseModel

Declaration:

class InlineInAppMessageData: BaseModel
@interface SNRInlineInAppMessageData : SNRBaseModel

Properties:

Property Type Optional Description
campaignHash String no Identifier of the inline in-app message campaign
placementKey String no Placement key configured in the campaign
variantIdentifier String no Identifier of the inline in-app message campaign variant
additionalParameters [String: String] yes Additional parameters provided by the campaign
isTest Bool no Specifies whether the object is from a test campaign

IMPORTANT: All properties are read-only.



InlineInAppSize

Model representing the size of an inline in-app message, reported through the snr_inlineInAppViewChangeSizeIsNeeded delegate method when the content calls SRInApp.setComponentSize(width, height).

WARNING: This is a read-only class and it is not meant to be instantiated directly.

Declared In:
Headers/SNRInlineInAppSize.h

Inherits From:
BaseModel

Declaration:

class InlineInAppSize: BaseModel
@interface SNRInlineInAppSize : SNRBaseModel

Properties:

Property Type Optional Description
widthPt Double no Width in points
heightPt Double no Height in points
widthPx Int no Width in physical pixels
heightPx Int no Height in physical pixels
widthScreenRatio Double no Width as a fraction of the device screen width (0 to 1)
heightScreenRatio Double no Height as a fraction of the device screen height (0 to 1)

IMPORTANT: All properties are read-only.



InlineInAppView

View that hosts an inline in-app message. Create it with Injector.createInlineInAppView(placementKey:) or use InlineInAppViewWrapper in Interface Builder. Do not instantiate InlineInAppView directly.

Declared In:
Headers/SNRInlineInAppView.h

Related To:
InlineInAppMessageData
InlineInAppSize
InlineInAppViewDelegate

Inherits From:
UIView

Declaration:

class InlineInAppView: UIView
@interface SNRInlineInAppView : UIView

Properties:

Property Type Optional Description
delegate InlineInAppViewDelegate yes Per-view delegate for lifecycle events. Weak reference
data InlineInAppMessageData yes Data of the currently rendered campaign (read-only)

Methods:

Method Return type Description
getIdentifier() String? Returns the application-defined identifier of the view
setIdentifier(String) void Sets a free-form identifier on the view
getPlacementKey() String Returns the placement key assigned to the view
isRendered() Bool Returns whether an inline in-app message campaign is currently rendered
getData() InlineInAppMessageData? Returns the data of the currently rendered campaign, or nil
render() void Triggers on-demand rendering


InlineInAppViewWrapper

Interface Builder-compatible wrapper for InlineInAppView. Set the placementKey in the Attributes Inspector or call configure(placementKey:) in code. The wrapper creates the underlying InlineInAppView when configured.

Declared In:
Headers/SNRInlineInAppViewWrapper.h

Related To:
InlineInAppView
InlineInAppViewDelegate

Inherits From:
UIView

Declaration:

final class InlineInAppViewWrapper: UIView
@interface SNRInlineInAppViewWrapper : UIView

Properties:

Property Type Optional Description
placementKey String yes Placement key, settable from Interface Builder (@IBInspectable)
delegate InlineInAppViewDelegate yes Per-view delegate for lifecycle events. Weak reference
inlineInAppView InlineInAppView yes The underlying inline in-app view (read-only, available after configuration)
data InlineInAppMessageData yes Data of the currently rendered campaign (read-only)

Methods:

Method Return type Description
configure(placementKey: String) void Creates and configures the underlying InlineInAppView
render() void Triggers on-demand rendering


InjectorInlineInAppMessageDelegate

Delegate for global inline in-app message events. Set it with Injector.setInlineInAppMessageDelegate(_:). All methods are optional.

Declared In:
Headers/SNRInjector.h

Related To:
InlineInAppView
InlineInAppMessageData
InAppCustomMethodCompletion

Declaration:

protocol InjectorInlineInAppMessageDelegate: AnyObject
@protocol SNRInjectorInlineInAppMessageDelegate <NSObject>

Methods:

Method Description
snr_inlineInAppMessageDidBecomeAvailable(view:data:) Called when the SDK creates a ready-to-display view after an event-based trigger for a placement with no attached view
snr_inlineInAppMessageContextIsNeeded(data:) Called when the SDK needs per-message context for rendering. Returns [AnyHashable: Any]?
snr_inlineInAppMessageHandledAction(data:url:) Called when SRInApp.openUrl(url) is used in an inline in-app message
snr_inlineInAppMessageHandledAction(data:deepLink:) Called when SRInApp.openDeeplink(url) is used in an inline in-app message
snr_inlineInAppMessageHandledCustomAction(data:name:parameters:) Called when SRInApp.handleCustomAction(name, params) is used in an inline in-app message
snr_inlineInAppMessageHandledCustomMethod(data:name:parameters:completion:) Called when SRInApp.customMethod(name, params) is used. Resolve completion exactly once


InlineInAppViewDelegate

Per-view delegate for the lifecycle of an inline in-app message. Set it on the delegate property of InlineInAppView. All methods are optional.

Declared In:
Headers/SNRInlineInAppView.h

Related To:
InlineInAppView
InlineInAppMessageData
InlineInAppSize

Declaration:

protocol InlineInAppViewDelegate: AnyObject
@protocol SNRInlineInAppViewDelegate <NSObject>

Methods:

Method Description
snr_inlineInAppViewDidStartProcessing(view:) Called when the SDK starts processing a campaign for this view
snr_inlineInAppViewDidLoad(view:data:) Called when the inline in-app message content is loaded for the first time
snr_inlineInAppViewDidUpdate(view:data:) Called when the inline in-app message content is updated with a new campaign
snr_inlineInAppViewDidFail(view:error:) Called when the inline in-app message content fails to load or render
snr_inlineInAppViewChangeSizeIsNeeded(view:data:size:) Called when the content requests a size change
snr_inlineInAppViewShouldBeRemoved(view:data:) Called when the content requests removal from the view hierarchy


InAppCustomMethodCompletion

Completion handler for custom methods invoked from in-app message content. Resolve it exactly once with success or failure; subsequent calls are ignored.

WARNING: This class is not meant to be instantiated directly. It is passed to delegate methods.

Declared In:
Headers/SNRInAppCustomMethodCompletion.h

Inherits From:
NSObject

Declaration:

final class InAppCustomMethodCompletion: NSObject
@interface SNRInAppCustomMethodCompletion : NSObject

Methods:

Method Return type Description
success(Any?) void Reports successful completion
failure(String) void Reports a failure with an error message


Removed symbols


SyneriseActivity

Use SyneriseSource instead.

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

Declared In:
Headers/SNRSyneriseActivity.h

Declaration:

enum SyneriseActivity: Int {
    simplePush,
    banner,
    walkthrough,
    inAppMessage
}
typedef NS_ENUM(NSInteger, SNRSyneriseActivity) {
    SNRSyneriseActivitySimplePush,
    SNRSyneriseActivityBanner,
    SNRSyneriseActivityWalkthrough,
    SNRSyneriseActivityInAppMessage
}


SyneriseActivityAction

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

Declared In:
Headers/SNRSynerise.h

Declaration:

enum SyneriseActivityAction: Int {
    none,
    hide
}
typedef NS_ENUM(NSInteger, SNRSyneriseActivityAction) {
    SNRSyneriseActivityActionNone,
    SNRSyneriseActivityActionHide
}

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