0

I read a few threads and it seems like the UDID is deprecated. I also checked out CFUUIDCreate() but that's not really what I'm looking for.

I'm planning to do give aways in my app, so the only information I need from the user is the email address and a unique identifier of the device. I don't want the user to be able to simply reinstall the app and re-register for the give away. The easiest way would be to send some kind of device identifier together with the email address.

Any suggestions?

EDIT: Can I use the MAC address for this purpose? Any other ideas?

EDIT2: Nevermind, that's deprecated aswell...

EDIT3: I think I found something: How to generate unique identifier which should work in all iOS versions?

EDIT4: I'm using the solution in the link above, it works great!

Community
  • 1
  • 1
oybcs
  • 327
  • 1
  • 4
  • 14
  • The `UDID` has been more then deprecated it has been totally removed from any and every API. – Popeye May 13 '14 at 18:27
  • Oh okay I see thanks, so any suggestions for a solution to my problem? – oybcs May 13 '14 at 18:29
  • 1
    Surely each user needs a separate account (on a system you control) and the giveaways need to be linked to that account rather than being linked to a device that someone could sell or pass onto someone else. – Robotic Cat May 13 '14 at 18:34
  • @RoboticCat from a user and business point of view that would make a lot more sense. – Popeye May 13 '14 at 18:36
  • @RoboticCat Yes of course, but how do I make sure that each user can enter the give away only once per device? Maybe I could use the phone number like whatsapp does, but that isn't as easy as it would be with the UDID. And I feel like many people wouldn't want some developer to have their numbers. Anyways, I think I found a solution, see the link in my edit. – oybcs May 13 '14 at 18:41
  • @CemYesil Well if you went the way of `RoboticCat`s idea each user would need a user account which would be linked to your webservice and on there you would have something as simple as `New User` and if they are a `New User` then they get the first time (One off) giveway otherwise they don't, this would make it so they couldn't just go to another device and obtain another one on a new device and it makes it so if the device was sold to someone else that new person can get the giveaway as well. This is more user friendly and better business model and is more logical. – Popeye May 14 '14 at 15:00

2 Answers2

1

Apple no longer allowes access to UDID from public APIs.

Perhaps you can use a web service to tell the device by it's IP, etc. Although there may be a way to mislead it, it will be better than using nothing.

Another solution would be using iCloud, only a few users would actually make the effort to make a new account.

Whatever you do, remember to make sure you don't break Apple's AppStore guidelines: https://developer.apple.com/appstore/resources/approval/guidelines.html (see "20. Contests, sweepstakes, lotteries, raffles, and gambling")

Hristo
  • 6,382
  • 4
  • 24
  • 38
  • Thank you for your help, I think I just found a solution, see the link in my last edit. Using the IP wouldn't be a good idea since it's not static. Thanks for the link, I have thought about it, but was sure it wouldn't be an issue. I'll check it out right now! – oybcs May 13 '14 at 18:44
0

See a list of possible identifications below. Only the CFUUID provides you an unique identifier, but when you reinstall the app the ID is regenerated.

You may save the mail address of the user who received a giveaway in a separate online db.


UDID

  • unique and permanent device identification (deprecated)

CFUUID / NSUUID

  • Random-ID, which is not bound to the device
  • is for each installed app different
  • only persistent till you delete the app

Advertising Identifier

  • for all apps identically
  • can be changed by the user
  • can be globally turned off

Identifier for Vendor (IDFV)

  • identically for all apps of one developer

MAC adress

  • cannot be used
  • no identification of a device, because the API returns the same MAC address for all devices
Max B.
  • 881
  • 10
  • 21