How to identify iOS device(instead of imei) - ios

I want to uniquely identify devices of my app users. Since I can't have imei, what are other options?

We create our own UDID's based on a hash of the device MAC address and the bundle identifier. This ensures that we can uniquely identify our app on a specific device.
You could also create a hash based only on the MAC address if you need a unique ID across multiple apps.
I've actually written a blog post about how to do this and provided some sample code here:
https://radeeccles.com/blog/create-your-own-unique-device-identifier-udid

You might have a try with OpenUDID.

Related

Xamarin IOS identifying device

I'm writing an application which will be used in an enterprise, no outsiders.
This application should fetch data from API response and display it.
Each user has his own device, Ipad and should see only the data he is the owner of.
Problem i'm facing is identifying the device/user, so that API responds with only the information the user is supposed to see.
brief example of how it should work:
App is opened -> get unique id -> attach ID to API call -> receive appropiate response -> display data
As i imagine this ID should be static and not made upon installation of the app or generated.
I've tried getting UDID, Serial, MAC,- no luck, they're deprecated. Only managed to get .IdentifierForVendor, which is unique not in the way that i need.
So here is my question, are there any other options left?
Like fetching appleID name,email or should i make unique deployments for everyone separately?
Or a Log-in screen?
You could create a GUID for every App instance. However, apart from that you will have a hard time doing what you want.
These ways of identifying a device have been deprecated to ensure Advertisers and other malicious Apps cannot fingerprint a device easily.
If you don't want too much hassle authenticating everyone, you could apply a simpler scheme such as using a pin code, QR code, NFC tag or whatever you prefer.
However, if someone were to steal one of these enterprise devices and it would contain any secret information I would rather rely on something more secure as username and password, or even better something multi-factor.
Unique id's will have to be set by deploying the app from MDM. For example:
https://docs.jamf.com/9.9/casper-suite/administrator-guide/In-House_Apps.html
How should the application accept those variables, i dont know. Maybe it modifies .plist when deploying.
Solution i did was enforcing device name from MDM, so that users are unable to change it - and using that as the unique identifier.

How can I get identification string look like IMEI in IOS

My project have a case: one account user can only log on to one device ( if user log on to app in device A, user can't log on to app in device B). My Idea is: when user login, I'll get the imei Iphone (like android) and send it with request login to server. But I can't get imei. I try with UUID, but UUID will change when re install app. Keychain does not solve the problem. Please help me.
You have to use Keychain to store Unique Id , this will not change even if user delete app
You can use any wrapper Source code to do this
here is an example
https://github.com/Joe0708/KeychainUUID
At the beginning I'd like to mention that I do not know any method that directly answers your question, especially that Apple does not allow you to read IMEI and other similar stuff due to privacy concerns. This has been answered here.
The workaround might be as follows
Take a look at the UIDevice class, especially at the identifierForVendorProperty which provides you (according to documentation ) with a device specific value.
The value of this property is the same for apps that come from the same vendor running on the same device. A different value is returned for apps on the same device that come from different vendors, and for apps on different devices regardless of vendor.
As far as i know some financial apps are secured this way to permit only one device to access the account. This however requires registering a device each time application is reinstalled.
Alternatively you can use UUID you generate within your app (first run) and then you assign it for the user online. It might take the form similar to two step verification process. Be aware however that with such restrictions user will have to be online all the time to use your app.

UUID ios for different apps

I need use id of device. But I have some problem with it. Mainly, id should be the same for different apps from different vendors. I can't use keychain because applications from different vendors and uses different provision profiles. But my server should identify this device for all these applications. Because I want see, that one device has 2 applications(with my lib), for example, and other device has one application. Something like statistics
This is not possible because Apple sees this a breach of privacy.
If you do not post application to Apple Store (B2B mode), you can get the serial number of a device as UUID via the private Framework IOKit.
For a Category for this that encapsulates the low-level C see: https://gist.github.com/0xced/566994

Unique device identifier iOS 7 for give away purposes

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!
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")
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

iOS hardware parameters for unique id generation

Hi I would like to generate an unique id for an iOS device using any of the device hardware parameters. I do not want to use the MAC address because there is a chance that the MAC address can also be changed. So can you please let me know if there is any other unique hardware parameter with which I can generate an unique ID.
I believe something along the lines of this is the generally accepted replacement for UUID.
In short, you need to create a CFUUID, and then store it in the Keychain on the iOS device, which persists even if you uninstall the app. Having written my own implementation along those lines (not the one I've linked to, obviously), I've yet to come across any real problems with this. It can even be accessed in your other apps that you make, so long as you access it with the same security parameters in aloof your apps.

Resources