UAScheduleDelay

@interface UAScheduleDelay : NSObject

A delay defines an amount of time and/or app conditions that must be met before the actions are able to be executed. The delay occurs after one of the triggers hits its goals.

Note

This object is built using UAScheduleDelayBuilder.
  • Checks if the delay is valid. A valid delay must contain at most 10 cancellation triggers.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL isValid;

    Swift

    var isValid: Bool { get }
  • Minimum amount of time to wait in seconds before the schedule actions are able to execute.

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSTimeInterval seconds;

    Swift

    var seconds: TimeInterval { get }
  • Specifies the names of the app screens that will trigger the schedule’s actions if viewed. Specifying screens requires the application to make use of UAAnalytic’s screen tracking method trackScreen:.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) NSArray *screens;

    Swift

    var screens: [Any]? { get }
  • Specifies the ID of a region that the device must currently be in before the schedule’s actions are able to be executed. Specifying regions requires the application to add UARegionEvents to UAAnalytics.

    Declaration

    Objective-C

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

    Swift

    var regionID: String? { get }
  • Specifies the app state that is required before the schedule’s actions are able to execute.

    Declaration

    Objective-C

    @property (readonly, nonatomic) UAScheduleDelayAppState appState;

    Swift

    var appState: UAScheduleDelayAppState { get }
  • Array of cancellation triggers. Cancellation triggers define conditions on when to cancel the pending execution of schedule’s actions. If the delayed execution is cancelled, it will not cancel the schedule or count against the schedule’s limit.

    Declaration

    Objective-C

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

    Swift

    var cancellationTriggers: [UAScheduleTrigger] { get }
  • Creates a schedule delay with a builder block.

    Declaration

    Objective-C

    + (nonnull instancetype)delayWithBuilderBlock:
        (nonnull void (^)(UAScheduleDelayBuilder *_Nonnull))builderBlock;

    Swift

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

    Return Value

    A UAScheduleDelay instance.

  • Factory method to create a schedule delay from a JSON payload.

    Declaration

    Objective-C

    + (nullable instancetype)delayWithJSON:(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

    A UAScheduleDelay instance or nil if the JSON is invalid.

  • Checks if the delay is equal to another delay.

    Declaration

    Objective-C

    - (BOOL)isEqualToDelay:(nullable UAScheduleDelay *)delay;

    Swift

    func isEqual(to delay: UAScheduleDelay?) -> Bool

    Parameters

    delay

    The other delay to compare against.

    Return Value

    YES if the delays are equal, otherwise NO.