Instance Method

fetchLongLivedOperationWithID:completionHandler:

Returns the running or recently completed long-lived operation specified by the operation identifier.

Declaration

- (void)fetchLongLivedOperationWithID:(CKOperationID)operationID completionHandler:(void (^)(CKOperation *outstandingOperation, NSError *error))completionHandler;

Parameters

operationID

The identifier of the long-lived operation you want to fetch.

completionHandler

A block that has no return value and takes the following parameters:

outstandingOperation

The proxy object for the corresponding long-lived operation. If a long-lived operation was canceled or completed, this is nil.

error

An error object, or nil if the fetch is successful.

Discussion

A long-lived operation is an operation that continues to run after the app exits, described in CKOperation. To receive the callbacks for a long-lived operations, set its completion block and add it to an operation queue.

See Also

Fetching Long-Lived Operations

- fetchAllLongLivedOperationIDsWithCompletionHandler:

Returns the identifiers of the running or recently completed long-lived operations.