(First, see comments to your reply)
I also tried modifying presentCloudSharingController as such:
func presentCloudSharingController(photo: Photo) {
self.cloudKitContainer.fetchUserRecordID { recordID, recordIDError in
if let id = recordID, nil == recordIDError {
self.cloudKitContainer.fetchShareParticipant(withUserRecordID: id) { participant, participantError in
if let p = participant, nil == participantError {
let participantIdentity = p.userIdentity
print ("CDS: Identity: \(participantIdentity.description)")
if let participantName = participantIdentity.nameComponents {
print ("CDS: Identity Name: \(participantName.description.isEmpty ? "<none>" : participantName.description)")
}
}
else { print ("CDS: Error `fetchShareParticipant") }
}
}
else { print ("CDS: Error `fetchUserRecordID") }
}
...
}
The resulting output is:
CDS: Identity: <CKUserIdentity: 0x301da83c0; userID=_bfbb377f5fb38b76ecb9b35c3d050c79:(_defaultZone:__defaultOwner__), nameComponents=, lookupInfo=<CKUserIdentityLookupInfo: 0x303765590; userRecordID=_bfbb377f5fb38b76ecb9b35c3d050c79:(_defaultZone:__defaultOwner__)>, cached=false, publicKeyVersion=2>
CDS: Identity Name: <none>
Again the nameComponents are empty.
Topic:
App & System Services
SubTopic:
iCloud & Data
Tags: