iosiclouduniqueidentifiericloud-api

iCloud unique identifier


I'm trying to learn about iCloud. I've read that there's ubiquityIdentityToken and it's used to determine if iCloud is available or if the user changed the account signed in. Also, this is only available in ios 6+

But what i need to know is the unique data for every iCloud user. What i'm saying is, after the user logs into iCloud, is there a way for us developers to know who that persons is/who the account belongs to like a username or id (similar to Facebook's fbid/identiferForVendor)? Could we even get the iCloud account of the user in code?

The reason why I want to know this is because i want to check if it's possible to use the user's iCloud account(or whatever unique data we could get from them) as the user's unique identifier on our server.

I hope I could get some answers. Thank you so much!


Solution

  • Apple don't want you to do this. That is why they give you a unique token that is opaque. You can't use it as an id on your server. Apple do not allow iTunes accounts to be used in that way at this point in time.

    I suggest you use your own account names, or you use accounts from Facebook or Twitter, which are accessible via system APIs on iOS.