is it possible to get the user's information, such as apple ID, through the sdk? I am writing an app which will require an account linked to the app user. I want to allow the user to have one account across multiple devices, so using the device ID is not possible. The easiest way to do this, I am thinking, is to use the app user's apple ID as this account's ID, so not requiring them to create yet another account.
5 Answers
No, it's a privacy issue, just like their phone number.
They'd still have to create an account on your site since you don't have access to Apple's databases, and no one will be willing to give you their iTunes passwords for obvious reasons.
All you're really saving is them entering a user name, since they'd still have to give you a password. It's very easy to remember this data for future runs of your application. Look into using NSUserDefaults. I would recommend against using the UDID and give the user the option to save their password. That way if the phone is lost, whoever finds it doesn't have automatic access to the owner's account. If the user opts for automatic login, you can easily save the password and send it along with the username when the app loads.

- 12,611
- 5
- 45
- 62
If it is a game, you can use the Game Center Account to identify an user

- 553
- 5
- 20
-
1Exactly! AFAIK this is the only trustable unique id you can get in Apple world. Apple should think about this developers' need more carefully, in Android you can easily get user's email address and nobody dies because of it and everybody can gets a very trustable unique id for any kind of application! – Heitor Nov 09 '15 at 06:25
It's not (AFAIK) possible. You can only retrieve the device's UDID.
What I've done in the past is link an account on my side with multiple UDIDs on the user's side, so when they install the app on various devices they can just use that single account and it will automatically link that device. Not ideal, but I've not seen a better solution.

- 3,782
- 2
- 34
- 43
-
So that would mean they would have to create an account with you and login to use the service? That is the fallback solution, I am just trying to simplify my process so that the user does not have to create an account and login each time it runs. – gjrwebber Jan 06 '10 at 00:57
-
-
2You cannot use the device's UDID, it's deprecated as of iOS 5.0, and Apple will reject any App which uses it. – Jonas Sourlier Apr 16 '12 at 10:26
-
2
-
-
Accessing the device's mac address will get you rejected from the App Store as well, unfortunately. – Nicholas M T Elliott Aug 08 '13 at 12:08
Instead of the UDID for the device, you might try the [UIDevice currentDevice].identifierForVendor It is linked to the device and the app installation.

- 1
- 1

- 7,288
- 2
- 48
- 66
I am storing the username and encrypted password in a file that is stored in the user's application file space. When the app starts up, if it finds this file, it attempts a login without asking the user. Having a password, even encrypted, stored in the file system does seem insecure, but the application is not one where people are apt to try and steal passwords.