UALegacyInAppMessage
@interface UALegacyInAppMessage : NSObject
Model object representing in-app message data.
-
The in-app message payload in NSDictionary format
Declaration
Objective-C
@property (readonly, nonatomic) NSDictionary *_Nonnull payload;
Swift
var payload: [AnyHashable : Any] { get }
-
The unique identifier for the message (to be set from the associated send ID)
Declaration
Objective-C
@property (readwrite, copy, nonatomic, nullable) NSString *identifier;
Swift
var identifier: String? { get set }
-
The expiration date for the message. Unless otherwise specified, defaults to 30 days from construction.
Declaration
Objective-C
@property (readwrite, strong, nonatomic) NSDate *_Nonnull expiry;
Swift
var expiry: Date { get set }
-
Optional key value extra.
Declaration
Objective-C
@property (readwrite, copy, nonatomic, nullable) NSDictionary *extra;
Swift
var extra: [AnyHashable : Any]? { get set }
-
The display type. Defaults to
UALegacyInAppMessageDisplayTypeBanner
when built with the default class constructor. When built from a payload with a missing or unidentified display type, the message will be nil.Declaration
Objective-C
@property (assign, readwrite, nonatomic) UALegacyInAppMessageDisplayType displayType;
Swift
var displayType: UALegacyInAppMessageDisplayType { get set }
-
The alert message.
Declaration
Objective-C
@property (readwrite, copy, nonatomic, nullable) NSString *alert;
Swift
var alert: String? { get set }
-
The screen position. Defaults to
UAInAppMessagePositionBottom
.Declaration
Objective-C
@property (assign, readwrite, nonatomic) UALegacyInAppMessagePosition position;
Swift
var position: UALegacyInAppMessagePosition { get set }
-
The amount of time to wait before automatically dismissing the message.
Declaration
Objective-C
@property (assign, readwrite, nonatomic) NSTimeInterval duration;
Swift
var duration: TimeInterval { get set }
-
The primary color.
Declaration
Objective-C
@property (readwrite, strong, nonatomic, nullable) UIColor *primaryColor;
Swift
var primaryColor: UIColor? { get set }
-
The secondary color.
Declaration
Objective-C
@property (readwrite, strong, nonatomic, nullable) UIColor *secondaryColor;
Swift
var secondaryColor: UIColor? { get set }
-
The button group (category) associated with the message. This value will determine which buttons are present and their localized titles.
Declaration
Objective-C
@property (readwrite, copy, nonatomic, nullable) NSString *buttonGroup;
Swift
var buttonGroup: String? { get set }
-
A dictionary mapping button group keys to dictionaries mapping action names to action arguments. The relevant action(s) will be run when the user taps the associated button.
Declaration
Objective-C
@property (readwrite, copy, nonatomic, nullable) NSDictionary *buttonActions;
Swift
var buttonActions: [AnyHashable : Any]? { get set }
-
A dictionary mapping an action name to an action argument. The relevant action will be run when the user taps or
clicks
on the message.Declaration
Objective-C
@property (readwrite, copy, nonatomic, nullable) NSDictionary *onClick;
Swift
var onClick: [AnyHashable : Any]? { get set }
-
An array of UNNotificationAction instances corresponding to the left-to-right order of interactive message buttons.
Declaration
Objective-C
@property (readonly, nonatomic, nullable) NSArray *notificationActions;
Swift
var notificationActions: [Any]? { get }
-
A UANotificationCategory instance, corresponding to the button group of the message. If no matching category is found, this property will be nil.
Declaration
Objective-C
@property (readonly, nonatomic, nullable) UANotificationCategory *buttonCategory;
Swift
var buttonCategory: UANotificationCategory? { get }
-
Class factory method for constructing an unconfigured in-app message model.
Declaration
Objective-C
+ (nonnull instancetype)message;
Return Value
An unconfigured instance of UAInAppMessage.
-
Class factory method for constructing an in-app message model from the in-app message section of a push payload.
Declaration
Objective-C
+ (nullable instancetype)messageWithPayload:(nonnull NSDictionary *)payload;
Swift
convenience init?(payload: [AnyHashable : Any])
Parameters
payload
The in-app message section of a push payload, in NSDictionary representation.
Return Value
A fully configured instance of UAInAppMessage.
-
Tests whether the message is equal by value to another message.
Declaration
Objective-C
- (BOOL)isEqualToMessage:(nullable UALegacyInAppMessage *)message;
Swift
func isEqual(to message: UALegacyInAppMessage?) -> Bool
Parameters
message
The message the receiver is being compared to.
Return Value
YES
if the two messages are equal by value,NO
otherwise.