accept(_:completionHandler:)
Accepts the specified share metadata.
Declaration
func accept(_ metadata: CKShare.Metadata, completionHandler: @escaping @Sendable (CKShare?, (any Error)?) -> Void)func accept(_ metadata: CKShare.Metadata) async throws -> CKShareParameters
- metadata:
The metadata of the share to accept.
- completionHandler:
The handler to execute when the process finishes.
Discussion
The closure doesn’t return a value and takes the following parameters:
The corresponding share, or
nilif CloudKit can’t accept the metadata.An error if a problem occurs, or
nilif CloudKit successfully accepts the metadata.