UAScheduleDeferredData

Objective-C

@interface UAScheduleDeferredData : NSObject

Swift

class UAScheduleDeferredData : NSObject

Deferred schedule data.

  • URL

    The URL.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSURL *_Nonnull URL;

    Swift

    var url: URL { get }
  • Flag for retrying the URL if the request times out.

    Declaration

    Objective-C

    @property (nonatomic, readonly, getter=isRetriableOnTimeout) BOOL retriableOnTimeout;

    Swift

    var isRetriableOnTimeout: Bool { get }
  • The deferred type.

    Declaration

    Objective-C

    @property (nonatomic, readonly) UAScheduleDataDeferredType type;

    Swift

    var type: UAScheduleDataDeferredType { get }
  • Factory method.

    Declaration

    Objective-C

    + (nonnull instancetype)deferredDataWithURL:(nonnull NSURL *)URL
                             retriableOnTimeout:(BOOL)retriableOnTimeout;

    Swift

    convenience init(url URL: URL, retriableOnTimeout: Bool)

    Parameters

    URL

    The URL.

    retriableOnTimeout

    YES to retry on timeout, otherwise NO.

    Return Value

    A deferred data instance.

  • Factory method.

    Declaration

    Objective-C

    + (nonnull instancetype)deferredDataWithURL:(nonnull NSURL *)URL
                             retriableOnTimeout:(BOOL)retriableOnTimeout
                                           type:(UAScheduleDataDeferredType)type;

    Swift

    convenience init(url URL: URL, retriableOnTimeout: Bool, type: UAScheduleDataDeferredType)

    Parameters

    URL

    The URL.

    retriableOnTimeout

    YES to retry on timeout, otherwise NO.

    type

    The deferred type.

    Return Value

    A deferred data instance.

  • Class factory method for constructing deferred data from JSON.

    Declaration

    Objective-C

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

    Swift

    convenience init(json: Any) throws

    Parameters

    json

    JSON object that defines the data.

    error

    An NSError pointer for storing errors, if applicable.

    Return Value

    A fully configured instance of UAScheduleDeferredData or nil if JSON parsing fails.

  • Method to return the data as its JSON representation.

    @returns JSON representation of the data.

    Declaration

    Objective-C

    - (nonnull NSDictionary *)toJSON;

    Swift

    func toJSON() -> [AnyHashable : Any]