UASchedule
Objective-C
@interface UASchedule : NSObject
Swift
class UASchedule : NSObject
Contains the schedule info and identifier.
Note
This object is built usingUAScheduleBuilder
.
-
The schedule’s identifier.
Declaration
Objective-C
@property (nonatomic, readonly) NSString *_Nonnull identifier;
Swift
var identifier: String { get }
-
The schedule’s group.
Declaration
Objective-C
@property (nonatomic, readonly) NSString *_Nonnull group;
Swift
var group: String { get }
-
The schedule’s metadata.
Declaration
Objective-C
@property (nonatomic, readonly) NSDictionary *_Nonnull metadata;
Swift
var metadata: [AnyHashable : Any] { get }
-
The schedule’s priority. Schedules are executed by priority in ascending order.
Declaration
Objective-C
@property (nonatomic, readonly) NSInteger priority;
Swift
var priority: Int { get }
-
Array of triggers. Triggers define conditions on when to execute the schedule.
Declaration
Objective-C
@property (nonatomic, readonly) NSArray<UAScheduleTrigger *> *_Nonnull triggers;
Swift
var triggers: [ScheduleTrigger] { get }
-
The audience conditions for the message.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) UAScheduleAudience *audience;
Swift
var audience: ScheduleAudience? { get }
-
The max number of times the schedule may be executed.
For in-app messages, if the audience condition checks fail, and the miss behavior is
skip
, the triggered schedule will not count towards the limit.Declaration
Objective-C
@property (nonatomic, readonly) NSUInteger limit;
Swift
var limit: UInt { get }
-
The schedule’s start time.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSDate *start;
Swift
var start: Date? { get }
-
The schedule’s end time. After the end time the schedule will be finished.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSDate *end;
Swift
var end: Date? { get }
-
The schedule’s delay.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) UAScheduleDelay *delay;
Swift
var delay: ScheduleDelay? { get }
-
The schedule’s edit grace period.
Declaration
Objective-C
@property (nonatomic, readonly) NSTimeInterval editGracePeriod;
Swift
var editGracePeriod: TimeInterval { get }
-
The schedule’s interval.
Declaration
Objective-C
@property (nonatomic, readonly) NSTimeInterval interval;
Swift
var interval: TimeInterval { get }
-
Checks if the schedule info is valid. A valid schedule contains between 1 to 10 triggers, a valid delay, data, an the end time must be after the start time.
Declaration
Objective-C
@property (nonatomic, readonly) BOOL isValid;
Swift
var isValid: Bool { get }
-
Checks if the schedule is equal to another schedule.
Declaration
Objective-C
- (BOOL)isEqualToSchedule:(nullable UASchedule *)schedule;
Swift
func isEqual(to schedule: UASchedule?) -> Bool
Parameters
schedule
The other schedule to compare against.
Return Value
YES
if the schedules are equal, otherwiseNO
.