UAActionScheduleInfo

@interface UAActionScheduleInfo : NSObject

Defines the scheduled action.

  • Actions payload to run when the schedule is triggered.

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSDictionary *_Nonnull actions;

    Swift

    var actions: [AnyHashable : Any] { get }
  • Array of triggers. Triggers define conditions on when to run the actions.

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSArray<UAScheduleTrigger *> *_Nonnull triggers;

    Swift

    var triggers: [UAScheduleTrigger] { get }
  • Number of times the actions will be triggered until the schedule is canceled.

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSUInteger limit;

    Swift

    var limit: UInt { get }
  • The schedule’s group.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) NSString *group;

    Swift

    var group: String? { get }
  • The schedule’s start time.

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSDate *_Nonnull start;

    Swift

    var start: Date { get }
  • end

    The schedule’s end time. After the end time the schedule will be canceled.

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSDate *_Nonnull end;

    Swift

    var end: Date { get }
  • The schedule’s delay.

    Declaration

    Objective-C

    @property (readonly, nonatomic) UAScheduleDelay *_Nonnull delay;

    Swift

    var delay: UAScheduleDelay { get }
  • Checks if the schedule info is valid. A valid schedule must contain at least 1 action, contains between 1 to 10 triggers, if a delay is defined it must be valid, and the end time must be after the start time. Invalid schedules will not be scheduled.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL isValid;

    Swift

    var isValid: Bool { get }
  • Factory method to create an action schedule info from a JSON payload.

    Declaration

    Objective-C

    + (nullable instancetype)
    actionScheduleInfoWithJSON:(nonnull id)json
                         error:(NSError *_Nullable *_Nullable)error;

    Swift

    convenience init(json: Any) throws

    Parameters

    json

    The JSON payload.

    error

    An NSError pointer for storing errors, if applicable.

    Return Value

    An action schedule info or nil if the JSON is invalid.

  • Creates an action schedule info with a builder block.

    Declaration

    Objective-C

    + (nonnull instancetype)actionScheduleInfoWithBuilderBlock:
        (nonnull void (^)(UAActionScheduleInfoBuilder *_Nonnull))builderBlock;

    Swift

    convenience init(builderBlock: @escaping (UAActionScheduleInfoBuilder) -> Void)

    Return Value

    The action schedule info.

  • Checks if the schedule info is equal to another schedule info

    Declaration

    Objective-C

    - (BOOL)isEqualToScheduleInfo:(nullable UAActionScheduleInfo *)scheduleInfo;

    Swift

    func isEqual(to scheduleInfo: UAActionScheduleInfo?) -> Bool

    Parameters

    scheduleInfo

    The other schedule info to compare against.

    Return Value

    YES if the schedule infos are equal, otherwise NO.