How to Get Unique Identity From iOS Device? - ios

i am NewBie in iOS Development and i Know that this Question are asked many Times. i am do R&D on it but Not Get my Answer. I want to Get any Unique identity from devise. i know that there are many Option like as
1.UDID
2.UUID
But From iOS 7 Apple not accept app that Fetch UDID From Devise so that Option is Block For me. and Now Second Option is UUID But From my R&D Result UUID will be Changed Every time when User Completely Uninstall application and Reinstall it. So, I Get Different UUID for Same Device. and Another Option is like as
Device Token
Here I want to Know that for Push Notification Service Device Token are remaining same for Every time When User Uninstall app and Reinstall it. if Device token are Different for Every Uninstall and Reinstallation Process then please Give me Any Solution for Unique Identification that are Remaining same for every time.
thanks in advance.

You can save UUID in the keychain, so even uninstall and reinstall app, you still can get it back.

If all you want to do is to uniquely identify devices, you may want to use [UIDevice identifierForVendor] which will stay the same as long as the apps come from the same vendor and running on the same device.
See documentation.

Related

How does Yubo previously known as Yello remember users after reinstall?

Okay, I have asked Reddit 3x and Apple once and no one could answer this so I am coming to you guys. Please be the ones to answer this validly. Okay, details. Yubo remembers my phone after reinstall and I do not know how. I have tried the following:
Changed my IP Address using a VPN
Change my IDFA through reset identifier which I now know is pointless as since I had “limit ad tracking” on the output would have been an output value of numerous 0’s (though this some how got me unbanned from the “Instagram” app, idk how tho)
Changed my IDFV by...well reinstalling the app (Yubo is there only app so don’t ask about other apps from the vendor)
Change my iPhones name multiple times
Prevented the app from being backed up on Icloud then reinstalling
I also logged out of the Icloud prior to using the app for the first time after reinstall
And that’s about it. I am aware the app may recognize: my phone, ios version and hardware. However, none of that is exclusive to my phone. I have read people having the exact same model and phone so i doubt Yubo is remembering me through that. I have never met an app so smart before, but I know some of you have probably been screaming this entire time one thing I have missed so please tell me what i missed and a way to change it without resetting my phone.
My device: Iphone6s and IOS 11

Detect if user has installed app previously even if deleted

I wonder if somebody can come up with a solution for the following problem.
I have created an iOS app of which for the first x amount of days the unknown user (guest) will have access to the full version of the app.
Then after the "trial" period i want to then put them on the free version of the app which will be ad supported if they don't want to pay a fee.
one issue i can for see is that the user could simply delete the app and reinstall to then restart the trial period.
One solution i can possibly imagine is that a file is uploaded to a "secure" section of the users iCloud account and check against that?
Has anybody come up against this issue before and what was the best solution you discovered without the need of a registration signup?
Thanks
Thomas
Your iCloud solution should work. You can also consider storing a similar flag in the device keychain as that isn't cleared when the app is deleted. Note that the user can still restore the device or disable iCloud integration on the device to 'work around' these things, but that's relatively uncommon.

Best way to uniquely identify iOS device?

I'm aware if the following methods, each which has it'd flaws
UDID
Advertising Identifier
Vendor ID
The problem with UDID is that its deprecated and doesn't even work as of ios7, problem with other two is that the user can change them via software reset of phone or reinstallation of app
Another interesting solution I found is to randomly generate one yourself and then save to keychain to avoid deletion upon app reinstallation however would this work across software resets? And surely there's a very small chance that two devices would randomly generate the same ID?
I think the best option might be to use UDID but I would like to know if, even though the UDID is incorrect as of ios7, is it still unique?
Yet another option is MAC address but as far as I know, there is no API for these
Please advise on the best option
Starting iOS 7 deducing MAC address isn't possible. You can, however, use below:
[[[UIDevice currentDevice] identifierForVendor] UUIDString]
Per Apple Documentation:
The value changes when the user deletes all of that vendor’s apps from
the device and subsequently reinstalls one or more of them. The value
can also when installing test builds using Xcode or when installing an
app on a device using ad-hoc distribution. Therefore, if your app
stores the value of this property anywhere, you should gracefully
handle situations where the identifier changes.

Identify device between installs iOS, like Whisper App

I am developing an app where I would like to be able to stop users from uninstalling the app and reinstalling to create a new user account. It's a fitness app and they get points/penalties depending on activity levels.
Now as far as I can tell I can only get two unique identifiers from the device, the Vendor ID which will be reset once the user uninstalls the app or the advertiser Id which the user can reset at will. So as far as I can see, no real way of doing it if the user is savvy enough.
So, how do whisper do it, I played with the app a while ago and upon reinstalling it it knew exactly who I was. As an experiment I uninstalled the app, reset my advertising if and restarted the phone. I then reinstalled the app and again it knew exactly who I was.
How is this possible? I thought the whole point of the user being able to reset these things is to allow for them to block tracking?
I would very much like to have this ability in my app, but cannot see any way with the current apple api's and guidelines to make it work?
If you gat UDID of the device and save it to your database, you can always search from database to check if this UDID already exists or not. You can get UDID by the code
NSString* uniqueIdentifier = [[[UIDevice currentDevice] identifierForVendor] UUIDString];

Retrieving UDID via private API

I'm looking for a way to retrieve the UDID on devices running iOS 6+ (Enterprise deployment only - no app store limitations).
Calling the (now private) method uniqueIdentifier returns the 'vendorIdentifier' starting with 'FFFFFFF'. Unfortunately thats not what I want.
Any ideas? Is there another private method or something?
Thanks in advance.
I recommend you reading this article. To sum up:
The previously deprecated uniqueIdentifier now works like vendorIdentifier on iOS 7+, so it's no longer usable even for Enterprise Apps
OpenUDID cannot be shared between Applications on iOS 7+ and now can change. It's still usable but no longer recommended.
The vendorIdentifier hasn't changed, but it's not recommended for Enterprise Apps because it can change when updating the App.
The new advertisingIdentifier API is the way to go for new Apps. It's the same for all Apps and should not change frequently, but the user can reset it in the settings page.
Edit: Website udid.io obtains the real Device UDID instead of the obfuscated one if you need it for anything outside your App. If you need the UDID from within the App, see my answer above.
You can get a Unique UDID via this method using private api. Follow this link
Look for the code in accepted answer.
Sorry, but Apple warned it would be deprecated and it has been. I've had the same headache myself.
I can't help you identify the device in the same way Apple do, but you can always generate an unique UUID on app launch and stash that away in KeyChain. It won't be perfect, but it will persist between installations and will be unique to the device. As far as I know, that's the current solution

Resources