0

I am using Xamarin.iOS for developing my app. I was using CloudKit Record ID to identify Apple User.

I was looking for some unique value which can be used to uniquely identify user, but seems this record Id is not unique.

I was referring this answer How to get the current user ID in CloudKit?

My app currently in Live and I can find other accounts with the same Id (Id in format "_skh1kj12hk1j2h3k12j3hk12jh3".

So, now, I can say for sure, that this id is not unique.

Am I doing something wrong?

Here is the code I am using:

  var defaultContainer = CKContainer.DefaultContainer;

  var userRecordId = await defaultContainer.FetchUserRecordIdAsync();

  return userRecordId.RecordName;
Dimple
  • 788
  • 1
  • 11
  • 27
  • 2
    Where are you "finding" these ids. The ids are unique per iCloud user, so if you have some data store id per device then you would expect duplicates since users may well have your app on multiple devices with the same iCloud account – Paulw11 Sep 19 '21 at 21:21
  • @Paulw11, I searched it in my Live DB, which now has more than a 1mil user records. I was looking for users which has the same icloud id, and I got about 15-20 records. I can confirm, that was not my accounts. We have also checked id of my colleague account and we also can see other users with the same Id – Il'ya Grishkevich Sep 20 '21 at 11:17
  • Sounds like something you might need to ask Apple about – Paulw11 Sep 20 '21 at 11:20
  • @Paulw11, I will continue investigation. Probably, in TestFlight it gives you random Id which may match other's real Id. Will post my finding. – Il'ya Grishkevich Sep 20 '21 at 11:45

0 Answers0