Instance Method

fetchAllLongLivedOperationIDsWithCompletionHandler:

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

Declaration

- (void)fetchAllLongLivedOperationIDsWithCompletionHandler:(void (^)(NSArray<CKOperationID> *outstandingOperationIDs, NSError *error))completionHandler;

Parameters

completionHandler

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

outstandingOperationsByIDs

An array containing the identifiers for all the active long-lived operations. If a long-lived operation is canceled or completed, it is no longer an active operation, and its identifier will not be included in this array. An operation is complete if the app successfully receives the completion callback.

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 get the operation object for an identifier, use the fetchLongLivedOperationWithID:completionHandler: method.

See Also

Fetching Long-Lived Operations

- fetchLongLivedOperationWithID:completionHandler:

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