Contents

userIdentities(forUserRecordIDs:)

Fetches the user identities for the specified user record IDs and returns them to an awaiting caller.

Declaration

func userIdentities(forUserRecordIDs userRecordIDs: [CKRecord.ID]) async throws -> [CKRecord.ID : CKUserIdentity]

Parameters

  • userRecordIDs:

    The users’ user record IDs.

Return Value

A Result that contains either a dictionary of user identities, or an error that describes why CloudKit can’t discover the user record IDs.

In the successful case, the dictionary uses the user record IDs you specify in userRecordIDs as its keys. Only successfully discovered user identities are present in this dictionary.

Discussion

Use this method to retrieve the identities of users who the current user knows. The users you’re searching for must meet the following criteria:

This method searches for users asynchronously and with a low priority. If you want the task to execute the request with a higher priority, create an instance of CKDiscoverUserIdentitiesOperation and configure it to use the necessary priority.