My App requires access to iCloud. I used to be able to get the User's name components (family+given name) using:
let dummyZone = CKRecordZone (zoneName: UUID().uuidString)
let dummyShare = CKShare (recordZoneID: dummyZone.zoneID)
Persistence.logger.notice ("\(#function): Dummy Zone: \(dummyZone.zoneID.zoneName)")
// Save the dummyZone and then the dummyShare (for/in the dummyZone)
let _ = try await container.privateCloudDatabase.save (dummyZone)
let _ = try await container.privateCloudDatabase.save (dummyShare)
// Extract the dummyShare's owner's identity - which is 'us/me'
let userIdentity = dummyShare.owner.userIdentity
where the resulting userIdentity
had a filled out nameComponents
. Now, recently, it seems to be empty.
Did something change in the interfaces?
I've also tried, more directly:
let userRecordID = try await container.userRecordID()
let userParticipant = try await container.shareParticipant(forUserRecordID: userRecordID)
let userIdentity = userParticipant.userIdentity
and still nameComponents is empty.
Given that my App requires iCloud, is there a way to get (familyName,givenName)?