UAInAppAutomation
Objective-C
@interface UAInAppAutomation : NSObject <UAComponent>
Swift
class InAppAutomation : NSObject, Component
Provides a control interface for creating, canceling and executing in-app automations.
-
The shared InAppAutomation instance.
Declaration
Objective-C
@property (class, nonatomic, readonly, null_unspecified) UAInAppAutomation *shared;
Swift
class var shared: InAppAutomation! { get }
-
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: InAppMessageManager { get }
-
Schedules an in-app automation.
Declaration
Objective-C
- (void)schedule:(nonnull UASchedule *)schedule completionHandler:(nonnull void (^)(BOOL))completionHandler;
Swift
func schedule(_ schedule: UASchedule) async -> Bool
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]) async -> Bool
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) async -> Bool
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) async -> Bool
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) async -> Bool
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) async -> Bool
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 actionSchedule(withID identifier: String) async -> ActionSchedule?
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 actionSchedules(withGroup group: String) async -> [ActionSchedule]
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 actionSchedules() async -> [ActionSchedule]
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 messageSchedule(withID identifier: String) async -> InAppMessageSchedule?
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 messageSchedules(withGroup group: String) async -> [InAppMessageSchedule]
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 messageSchedules() async -> [InAppMessageSchedule]
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 schedules() async -> [UASchedule]
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: ScheduleEdits) async -> Bool
Parameters
identifier
A schedule identifier.
edits
The edits to apply.
completionHandler
The completion handler with the result.