1

What's the easiest way to uniquely identify a user of an iphone app? I've seen some app only asks for phone number to 'register', isn't that unsafe or is there something I missed?

Got a Q about uniqueIdentifier, does it reset after some sort of reset/format or change of SIM card?

Would a traditional username/email/password be the safer approach?

Thanks.

Chris Cooper
  • 17,276
  • 9
  • 52
  • 70
Henry
  • 32,689
  • 19
  • 120
  • 221

4 Answers4

2

The easiest way would probably be by device ID:

 UIDevice *myDevice = [UIDevice currentDevice];
 NSString *uniqueIdentifier = [myDevice uniqueIdentifier];

This will uniquely identify the device, not the user.

If you want to identify the user, I would suggest using iTunes/Apple accounts, since users will already have that, and you don't have to mess with phone numbers which aren't applicable to iPods.

Chris Cooper
  • 17,276
  • 9
  • 52
  • 70
1

Maybe email address and password?

If you use Push Notification the user's device will have a unique token to all communication with your App. Maybe you could pull that token, then just not actually send the notification. Although the user has the option to deny the request, so you'd need a backup.

jessecurry
  • 22,068
  • 8
  • 52
  • 44
0

Unique identifier for an iPhone app

for safari: cookie the user - it works like a normal browser.

Community
  • 1
  • 1
Toby
  • 2,720
  • 5
  • 29
  • 46
  • I looked at that link, but is the uniqueIdentifier always the same for the same device? What if the owner sold the phone? That wouldn't work. Cookie? Doesn't seem to work. – Henry May 26 '10 at 23:35
  • Cookies are easily cleared. Bad idea for a unique identifier. – ceejayoz May 27 '10 at 05:02