How to replace the functionality of deprecated CKContainer.requestApplicationPermission(.userDiscoverability) ?

I am developing a Cloud Sharing app, but I have been unable to find a solution to this problem.

CKContainer.requestApplicationPermission(.userDiscoverability) was deprecated in iOS17. However, without it I find that none of the following APIs return a user's RecordID:

  • CKContainer.default().shareParticipants(forEmailAddresses: [emailAddress])
  • CKContainer.default().userIdentity(forEmailAddress: emailAddress) (deprecated)
  • CKContainer.default().discoverUserIdentity(withEmailAddress: emailAddress) (deprecated)
  • CKFetchShareParticipantsOperation(userIdentityLookupInfos: lookupInfo )

For users who have given permission in response to CKContainer.requestApplicationPermission(.userDiscoverability), these APIs return the user's RecordID in the response's CKUserIdentity. But for user's who have not been asked for permission, their CKUserIdentity does not contain their user RecordID.

After iOS17, how can we ensure that the response's CKUserUserIdentity contains the user's RecordID ?

I use the user's RecordID as part of my lookup (by email address) for other users, to confirm if they have already registered with the App. If not, I need to send them an invitation using the UICloudSharingController. If they have already registered, I can set up a share with them without the 'UICloudSharingController'.

Thanks for any suggestions.

How to replace the functionality of deprecated CKContainer.requestApplicationPermission(.userDiscoverability) ?
 
 
Q