fetchShareParticipant(withUserRecordID:completionHandler:)
Fetches the share participant with the specified user record ID.
Declaration
func fetchShareParticipant(withUserRecordID userRecordID: CKRecord.ID, completionHandler: @escaping @Sendable (CKShare.Participant?, (any Error)?) -> Void)func shareParticipant(forUserRecordID userRecordID: CKRecord.ID) async throws -> CKShare.ParticipantParameters
- userRecordID:
The share participant’s user record ID.
- completionHandler:
The handler to execute with the fetch results.
Discussion
The closure doesn’t return a value and takes the following parameters:
The share participant, or
nilif CloudKit can’t find the participant.An error if a problem occurs, or
nilif CloudKit successfully retrieves the participant.
This method searches for the share participant asynchronously and with a low priority. If you want the task to execute with a higher priority, create an instance of CKFetchShareParticipantsOperation and configure it to use the necessary priority.
See Also
Discovering User Records
discoverAllIdentities(completionHandler:)discoverUserIdentity(withEmailAddress:completionHandler:)discoverUserIdentity(withPhoneNumber:completionHandler:)discoverUserIdentity(withUserRecordID:completionHandler:)fetchShareParticipant(withEmailAddress:completionHandler:)fetchShareParticipant(withPhoneNumber:completionHandler:)fetchUserRecordID(completionHandler:)CKCurrentUserDefaultNameCKOwnerDefaultName