Contents

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 -> CKShare

Parameters

  • 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 nil if CloudKit can’t accept the metadata.

  • An error if a problem occurs, or nil if CloudKit successfully accepts the metadata.

See Also

Accessing Container Metadata