RSDTaskTransformer

public protocol RSDTaskTransformer

RSDTaskTransformer The task transformer is a lightweight protocol for vending a task. This can be used by an RSDTaskInfoStep to fetch a task or depending upon the design of the application, it could be used to fetch a task that is loaded from a table or collection view before presenting the task.

  • The estimated time to fetch the task. This can be used by the UI to determine whether or not to display a loading state while fetching the task. If 0 then the task is assumed to be cached on the device.

    Declaration

    Swift

    var estimatedFetchTime: TimeInterval
  • Fetch the task for this task info. Use the given factory to transform the task.

    Declaration

    Swift

    func fetchTask(with factory: RSDFactory, taskInfo: RSDTaskInfoStep, schemaInfo: RSDSchemaInfo?, callback: @escaping RSDTaskFetchCompletionHandler)

    Parameters

    factory

    The factory to use for creating the task and steps.

    taskInfo

    The task info for the task (if applicable).

    schemaInfo

    The schema info for the task (if applicable).

    callback

    The callback with the task or an error if the task failed, run on the main thread.