AI-generated Key Takeaways
-
GMTDDeliveryTaskManager manages the creation and updating of tasks.
-
The GMTDDeliveryTaskManager object cannot be directly initialized and must be obtained from the
deliveryTaskManagerproperty of the GMTDDeliveryDriverAPI object. -
Tasks are updated using the
updateTaskWithRequest:completion:method, which requires a GMTDUpdateDeliveryTaskRequest and a completion handler. -
New tasks are created using the
createTaskWithRequest:completion:method, requiring a GMTDCreateDeliveryTaskRequest and a completion handler.
GMTDDeliveryTaskManager
@interface GMTDDeliveryTaskManager : NSObjectObject that manages task creation and updates.
-
Unavailable
This class has no public initializers; obtain this object from the
deliveryTaskManagerproperty of theGMTDDeliveryDriverAPIobject.Declaration
Objective-C
- (null_unspecified instancetype)init; -
Updates a task with the given request.
Declaration
Swift
func updateTask(with request: GMTDUpdateDeliveryTaskRequest) async throws -> GMTDDeliveryTaskObjective-C
- (void)updateTaskWithRequest:(nonnull GMTDUpdateDeliveryTaskRequest *)request completion:(nonnull GMTDDeliveryTaskManagerCompletionHandler) completion;Parameters
requestThe request to update the task.
completionA block to be executed when the request is completed.
-
Creates a task with the given request.
Declaration
Swift
func createTask(with request: GMTDCreateDeliveryTaskRequest) async throws -> GMTDDeliveryTaskObjective-C
- (void)createTaskWithRequest:(nonnull GMTDCreateDeliveryTaskRequest *)request completion:(nonnull GMTDDeliveryTaskManagerCompletionHandler) completion;Parameters
requestThe request to create the task.
completionA block to be executed when the request is completed.