Reputation: 327
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!
Upvotes: 0
Views: 321
Reputation: 871
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
CFUUID / NSUUID
Advertising Identifier
Identifier for Vendor (IDFV)
MAC adress
Upvotes: 0
Reputation: 6540
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")
Upvotes: 1