UAInAppAutomation

Objective-C

@interface UAInAppAutomation : UAComponent

Swift

class UAInAppAutomation : UAComponent

Provides a control interface for creating, canceling and executing in-app automations.

  • In-app automation enable flag.

    Declaration

    Objective-C

    @property (nonatomic, getter=isEnabled) BOOL enabled;

    Swift

    var isEnabled: Bool { get set }
  • In-app automation pause flag.

    Declaration

    Objective-C

    @property (nonatomic, getter=isPaused) BOOL paused;

    Swift

    var isPaused: Bool { get set }
  • In-app automation manager.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) UAInAppMessageManager *_Nonnull inAppMessageManager;

    Swift

    var inAppMessageManager: UAInAppMessageManager { get }
  • Schedules an in-app automation.

    Declaration

    Objective-C

    - (void)schedule:(nonnull UASchedule *)schedule
        completionHandler:(nonnull void (^)(BOOL))completionHandler;

    Swift

    func schedule(_ schedule: UASchedule, completionHandler: @escaping (Bool) -> Void)

    Parameters

    schedule

    The schedule.

    completionHandler

    The completion handler to be called when scheduling completes.

  • Schedules multiple in-app automations.

    Declaration

    Objective-C

    - (void)scheduleMultiple:(nonnull NSArray<UASchedule *> *)schedules
           completionHandler:(nonnull void (^)(BOOL))completionHandler;

    Swift

    func scheduleMultiple(_ schedules: [UASchedule], completionHandler: @escaping (Bool) -> Void)

    Parameters

    schedules

    The schedules.

    completionHandler

    The completion handler to be called when scheduling completes.

  • Cancels an in-app automation via its schedule identifier.

    Declaration

    Objective-C

    - (void)cancelScheduleWithID:(nonnull NSString *)scheduleID
               completionHandler:(nullable void (^)(BOOL))completionHandler;

    Swift

    func cancelSchedule(withID scheduleID: String, completionHandler: ((Bool) -> Void)? = nil)

    Parameters

    scheduleID

    The schedule ID.

    completionHandler

    A completion handler called with the result.

  • Cancels in-app automations with the specified group identifier.

    Declaration

    Objective-C

    - (void)cancelSchedulesWithGroup:(nonnull NSString *)group
                   completionHandler:(nullable void (^)(BOOL))completionHandler;

    Swift

    func cancelSchedules(withGroup group: String, completionHandler: ((Bool) -> Void)? = nil)

    Parameters

    group

    The group.

    completionHandler

    A completion handler called with the result.

  • Cancels action in-app automations with the specified group identifier.

    Declaration

    Objective-C

    - (void)cancelActionSchedulesWithGroup:(nonnull NSString *)group
                         completionHandler:
                             (nullable void (^)(BOOL))completionHandler;

    Swift

    func cancelActionSchedules(withGroup group: String, completionHandler: ((Bool) -> Void)? = nil)

    Parameters

    group

    The group.

    completionHandler

    A completion handler called with the result.

  • Cancels message schedules with the specified group identifier.

    Declaration

    Objective-C

    - (void)cancelMessageSchedulesWithGroup:(nonnull NSString *)group
                          completionHandler:
                              (nullable void (^)(BOOL))completionHandler;

    Swift

    func cancelMessageSchedules(withGroup group: String, completionHandler: ((Bool) -> Void)? = nil)

    Parameters

    group

    The group.

    completionHandler

    A completion handler called with the result.

  • Gets the action in-app automation with the provided identifier.

    Declaration

    Objective-C

    - (void)getActionScheduleWithID:(nonnull NSString *)identifier
                  completionHandler:(nonnull void (^)(UAActionSchedule *_Nullable))
                                        completionHandler;

    Swift

    func getActionSchedule(withID identifier: String, completionHandler: @escaping (UAActionSchedule?) -> Void)

    Parameters

    identifier

    The scheduler identifier corresponding to the in-app message to be fetched.

    completionHandler

    The completion handler to be called when fetch operation completes.

  • Gets action in-app automations with the provided group.

    Declaration

    Objective-C

    - (void)getActionSchedulesWithGroup:(nonnull NSString *)group
                      completionHandler:
                          (nonnull void (^)(NSArray<UAActionSchedule *> *_Nonnull))
                              completionHandler;

    Swift

    func getActionSchedules(withGroup group: String, completionHandler: @escaping ([UAActionSchedule]) -> Void)

    Parameters

    group

    The group.

    completionHandler

    The completion handler to be called when fetch operation completes.

  • Gets all action in-app automations.

    Declaration

    Objective-C

    - (void)getActionSchedules:
        (nonnull void (^)(NSArray<UAActionSchedule *> *_Nonnull))completionHandler;

    Swift

    func getActionSchedules(_ completionHandler: @escaping ([UAActionSchedule]) -> Void)

    Parameters

    completionHandler

    The completion handler to be called when fetch operation completes.

  • Gets the message in-app automation with the provided identifier.

    Declaration

    Objective-C

    - (void)getMessageScheduleWithID:(nonnull NSString *)identifier
                   completionHandler:
                       (nonnull void (^)(UAInAppMessageSchedule *_Nullable))
                           completionHandler;

    Swift

    func getMessageSchedule(withID identifier: String, completionHandler: @escaping (UAInAppMessageSchedule?) -> Void)

    Parameters

    identifier

    The scheduler identifier corresponding to the in-app message to be fetched.

    completionHandler

    The completion handler to be called when fetch operation completes.

  • Gets the message in-app automations with the provided group.

    Declaration

    Objective-C

    - (void)getMessageSchedulesWithGroup:(nonnull NSString *)group
                       completionHandler:
                           (nonnull void (^)(NSArray<UAInAppMessageSchedule *>
                                                 *_Nonnull))completionHandler;

    Swift

    func getMessageSchedules(withGroup group: String, completionHandler: @escaping ([UAInAppMessageSchedule]) -> Void)

    Parameters

    group

    The group.

    completionHandler

    The completion handler to be called when fetch operation completes.

  • Get all message in-app automations.

    Declaration

    Objective-C

    - (void)getMessageSchedules:
        (nonnull void (^)(NSArray<UAInAppMessageSchedule *> *_Nonnull))
            completionHandler;

    Swift

    func getMessageSchedules(_ completionHandler: @escaping ([UAInAppMessageSchedule]) -> Void)

    Parameters

    completionHandler

    The completion handler to be called when fetch operation completes.

  • Get all in-app automations.

    Declaration

    Objective-C

    - (void)getSchedules:
        (nonnull void (^)(NSArray<UASchedule *> *_Nonnull))completionHandler;

    Swift

    func getSchedules(_ completionHandler: @escaping ([UASchedule]) -> Void)

    Parameters

    completionHandler

    The completion handler to be called when fetch operation completes.

  • Edits a schedule.

    Declaration

    Objective-C

    - (void)editScheduleWithID:(nonnull NSString *)identifier
                         edits:(nonnull UAScheduleEdits *)edits
             completionHandler:(nullable void (^)(BOOL))completionHandler;

    Swift

    func editSchedule(withID identifier: String, edits: UAScheduleEdits, completionHandler: ((Bool) -> Void)? = nil)

    Parameters

    identifier

    A schedule identifier.

    edits

    The edits to apply.

    completionHandler

    The completion handler with the result.