3

I would like to use the iPhone mobile phone numbers as part of the security in my app. How would I go about doing this or if not possible, how could I obtain the UID number.

It believe it is possible to do this with Android or Winmobile phones.

Abizern
  • 146,289
  • 39
  • 203
  • 257
user616076
  • 3,907
  • 8
  • 38
  • 64
  • What about iPods and iPads? Are you going to make your application not work on those devices, and thus suffer sales losses? – Richard J. Ross III Jun 20 '11 at 15:22
  • Try the answer to this question http://stackoverflow.com/questions/193182/programmatically-get-own-phone-number-in-iphone-os – Devin M Jun 20 '11 at 15:23

2 Answers2

3

There is UIDevice which has the uniqueIdentifier property

Abizern
  • 146,289
  • 39
  • 203
  • 257
  • That can be faked very easily. I do not suggest using that for security, although I honestly don't know what else you could use (besides the device's serial number, which can be gotten, but apple doesn't like it) – Richard J. Ross III Jun 20 '11 at 15:21
  • Thats not the phone number and this is a re post of a question. Loook here. http://stackoverflow.com/questions/193182/programmatically-get-own-phone-number-in-iphone-os' – Devin M Jun 20 '11 at 15:23
  • I never said it was the phone number - the question asked if the number could not be obtained, could the UID number be gotten. – Abizern Jun 20 '11 at 15:29
  • phone number *or* UID. He only wants the UDID if grabbing the number is not possible. – Devin M Jun 20 '11 at 15:30
  • And since using that method is likely to get you rejected from the App Store… – Abizern Jun 20 '11 at 15:40
0

Heres Apples recomendation for using the UID

A device’s unique identifier (sometimes abbreviated as UDID for Unique Device Identifier) is a hash value composed from various hardware identifiers such as the device serial number. It is guaranteed to be unique for each device. The UDID is independent of the device name. For devices that use a SIM (subscriber identity module) card, the UDID is independent of the SIM card.

For user security and privacy, you must not publicly associate a device’s unique identifier with a user account.

You may use the UDID, in conjunction with an application-specific user ID, for identifying application-specific data on your server. For example, you use could a device-user combination ID to control access to registered products or when storing high scores for a game in a central server. However, if you are developing a game, you may want to instead use Game Center’s player identifier key as explained in Game Kit Programming Guide.

Important: Never store user information based solely on the UDID. Always use a combination of UDID and application-specific user ID. A combined ID ensures that if a user passes a device on to another user, the new user will not have access to the original user’s dat

So it looks like if you are using this for storing data on a server you can use the UDID and a ID that you generate. Also it looks like Apple has gotten rid of many of the older ways that you would use to access the phone number.

Community
  • 1
  • 1
Devin M
  • 9,636
  • 2
  • 33
  • 46