UAInAppMessaging

@interface UAInAppMessaging : NSObject

Manager class for in-app messaging.

  • The pending in-app message.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic, nullable) UAInAppMessage *pendingMessage;

    Swift

    @NSCopying var pendingMessage: UAInAppMessage? { get set }
  • Enables/disables auto-display of in-app messages.

    Declaration

    Objective-C

    @property (getter=isAutoDisplayEnabled, assign, readwrite, nonatomic)
        BOOL autoDisplayEnabled;

    Swift

    var isAutoDisplayEnabled: Bool { get set }
  • The desired font to use when displaying in-app messages. Defaults to a bold system font 12 points in size.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic) UIFont *_Nonnull font;
  • The default primary color for messages (background and button color). Colors sent in an in-app message payload will override this setting. Defaults to white.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic) UIColor *_Nonnull defaultPrimaryColor;
  • The default secondary color for messages (text and border color). Colors sent in an in-app message payload will override this setting. Defaults to gray (#282828).

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic) UIColor *_Nonnull defaultSecondaryColor;
  • The initial delay before displaying an in-app message. The timer begins when the application becomes active. Defaults to 3 seconds.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) NSTimeInterval displayDelay;

    Swift

    var displayDelay: TimeInterval { get set }
  • Whether to display an incoming message as soon as possible, as opposed to on app foreground transitions. If set to YES, and if automatic display is enabled, when a message arrives in the foreground it will be automatically displayed as soon as it has been received. Otherwise the message will be stored as pending. Defaults to NO.

    Declaration

    Objective-C

    @property (getter=isDisplayASAPEnabled, assign, readwrite, nonatomic)
        BOOL displayASAPEnabled;

    Swift

    var isDisplayASAPEnabled: Bool { get set }
  • An optional delegate to receive in-app messaging related callbacks.

    Declaration

    Objective-C

    @property (readwrite, nonatomic, nullable) id<UAInAppMessagingDelegate>
        messagingDelegate;

    Swift

    weak var messagingDelegate: UAInAppMessagingDelegate? { get set }
  • A optional delegate for configuring and providing custom UI during message display.

    Declaration

    Objective-C

    @property (readwrite, nonatomic, nullable) id<UAInAppMessageControllerDelegate>
        messageControllerDelegate;

    Swift

    weak var messageControllerDelegate: UAInAppMessageControllerDelegate? { get set }
  • Displays the provided message. Expired messages will be ignored.

    Declaration

    Objective-C

    - (void)displayMessage:(nonnull UAInAppMessage *)message;

    Swift

    func display(_ message: UAInAppMessage)

    Parameters

    message

    The message to display.

  • Deletes the pending message if it matches the provided message argument.

    Declaration

    Objective-C

    - (void)deletePendingMessage:(nonnull UAInAppMessage *)message;

    Swift

    func deletePendingMessage(_ message: UAInAppMessage)

    Parameters

    message

    The message to delete.