How to find Serial Number, IMEI number using iOS SDK - ios

In my project i want to get the serial number and IMEI number using iOS SDK, What API's we can use to get in iOS7. I went through few links where they are using IO Frameworks, If we use those Apple will reject the App. How can we got forward.

Apple does not allow you the retrieve any device specific information like IMEI, UDID, Mac address, serial number, etc..
This has to do with the misuse of these identifier and the privacy of the user.

Apple forbids retrieving such information, as this is potentially harmful to the end users. Instead they provide you with identifierForVendor:
An alphanumeric string that uniquely identifies a device to the app’s vendor. (read-only)
refs: https://developer.apple.com/library/ios/documentation/uikit/reference/UIDevice_Class/Reference/UIDevice.html#//apple_ref/occ/instp/UIDevice/identifierForVendor
If you need to distinguish different apps from same vendor(on same device) you could use advertisingIdentifier, however docs clearly states it must be used only when it is in duty of ads(whether contributing install to an ad, or presenting ads in your app). Moreover I had application rejected because it was using this id, and was not declared in iTunesConnect.
An alphanumeric string unique to each device, used only for serving advertisements. (read-only)
refs: https://developer.apple.com/library/ios/documentation/AdSupport/Reference/ASIdentifierManager_Ref/ASIdentifierManager.html#//apple_ref/occ/instp/ASIdentifierManager/advertisingIdentifier
If you still decide to go for the latter one, don't forget do add AddSupport.framework to you project settings.

Related

How to design choose the SIM and get a unique id in iOS while authentication?

A) In android i can get the SIM details and can specifically choose the SIM for sending the OTP from that SIM. I have a sample screen which is possible to implement in Android.
I followed the link for ios How can I get details about the device data provider (like Verizon/AT&T) of an iphone programmatically?
https://developer.apple.com/forums/thread/9171 This link states we cant get the SIM Phone numbers from device because of Apple Privacy policy
How to implement the same screen in iOS? Any alternative idea or help is appreciated
B) How to get the Unique id for authentication?
In Android we can get (IMEI+SIM Serial number) can be used for authentication but in iOS all these are restricted due to privacy . Instead it is impossible to get UDID which is unique for every device. I know i can use vendor id for this:
UIDevice.current.identifierForVendor!.uuidString
But as the documentation says: The value in this property remains the same while the app (or another app from the same vendor) is installed on the iOS device. The value changes when the user deletes all of that vendor’s apps from the device and subsequently reinstalls one or more of them.
Since the vendor id changes when the user uninstalls the Application .So is it any way around to get a unique id other than Vendor ID for authentication which doesn't change and is unique all time?
How to get SIM phone number?
As it stated in the question, its not available to get the phone number due to the security reasons. I suggest you to have a textfield and let user to enter the numbers, so you can send the sms to verify it
How to get the Unique id for authentication?
You have two options here based on your deployment target needs:
Apple has come up with the DeviceCheck framework in iOS 11. Your app should use the DeviceCheck APIs to generate an ephemeral token that identifies a device. Your associated server combines this token with an authentication key that you receive from Apple and uses the result to request access to the per-device bits.
Very intentionally by Apple, DeviceCheck tokens can not be used to identify the specific device.
But you can try playing to get unique identifier for the iOS device state
Create your own unique ID and save it in the keychain.
References
WWDC 2017 — Session 702 — iOS, macOS, tvOS, watchOS
Apple Documentation: — Access per-device, per-developer data that your associated server can use in its business logic.
Unique Identifier for the iOS Devices Article

Is there a way to get unique ID from ios device to use it for authorization into API? - React Native

I want to get some unique identifier to allow specific devices to accessing my API, but looking on internet there's no way to get it and it's against Apple Policy,
But I need to get one of unique ID (e.g IMEI, UDID, ICCID, MEID, ETC)
looking on react-native-device-info, it just have getUniqueID() that can changed
This is IDFV on iOS so it will change if all apps from the current apps vendor have been previously uninstalled.
How can I get a unique ID ios devices?
FYI: My app won't be release into AppStore
There are major privacy concerns when getting a unique ID from a device. You have a few options.
First, you could just add some form of authentication or login system. This could be per device, per user, or even 1 login for the entire API. You could also limit the API to only respond to certain controlled IP addresses.
Second, you could add a flag and have a different version for production then in development. Limiting access that way.
Third, on first launch of your app you could request a new token from your server. The device would then store that token and the server would as well (to ensure no duplicates). Then just take that stored token and send it to the server for every request.
But on the device level there are privacy concerns in unique IDs for each device. You have to build your own system to handle it depending on your needs.
I would suggest that the IDFV was designed to suit your needs, while maintaining some level of privacy.
It is supposed to allow you (a vendor) to identify a return visit while not allowing you (a vendor) to share a user's identity with a third party in a relatable way for the third party to data-mine.
If users are routinely uninstalling and re-installing all of your apps I would look at solving the distribution issue you have there. I would assume (although haven't tested) that an update of an existing app would maintain the IDFV.

iOS device specific unique identifier

Is there any way to generate unique id for IOS devices?
I have a framework that helps to the apps to take login token from it, I am using identifierForVendor with no problems because all consumer apps published from same vendor, but I want to add another one from different publisher and adding that app to chain, identifierForVendor is no work anymore,
Also I can't use keychain since they are using different team id,
So can you please let me know if there is any other way to do this?
If I'm not mistaken Apple has revoked access to the real device identifier (UDID) and rather provides a pseudo-identifier to limit malicious usage thereof.
Refer to this previous answer https://stackoverflow.com/a/19402414/28305.
UDID is not available anymore so you can use
UIDevice.currentDevice().identifierForVendor?.UUIDString
more here
Or you can use DeviceCheck framework that is available from iOS 11
Just create a new key in Apple Developer account and generate a token with
DCDevice.current.generateToken(completionHandler:)
Note: You must use only real device to receive token.
You can find good tutorial here
Short answer: no because of data privacy concerns (at least in the official statements).
Apple blocked access to 'identifiers' such as UDIDs and hardware data such as MAC addresses and others. Even if there is currently such as field, as soon as it's exploited by a certain amount of people it will be removed or obfuscated soon.
The only thing that might work for a while is trying to get a browser fingerprint of the current device.

How to identify iOS device across multiple apps?

As you have understood from the question's title, I would like to know, how to identify iOS device across multiple apps. Advertising identifier and identifier for vendor is not an option for me, as apps may not have AdSupport framework included, and they may not have similar vendors. MAC address of the device is also deprecated. Any working solution on this? Thanks in advance!
This functionality is explicitly disallowed by Apple. Any workaround you come up with will violate Apple's stated goal of preventing it (so you would obviously risk appstore rejection even if it "works"). You are not allowed to track devices. You are only allowed to track the vendor ID and advertising ID. Apple has steadily removed every other tool because those are the ones they intend you to use (and their limitations are intentional).
What you are allowed to do is track users by issuing them login credentials and having them log into your server. This usually works fine if the user actually wants the functionality you're providing by tracking them (for example, users don't mind logging into Facebook or Twitter). If you are tracking users or devices to achieve a goal the users don't actually want (such as targeted advertising that the user can't control, or attempts at digital rights management tied to devices), you're unlikely to find a supported or permitted solution.

Is there a way to get mobile phone account in iOS app?

I'm developing an iOS app, but i need to identify the user who made the request to the web server.
I read on the internet that i cannot retrieve user's phone number, is there anything else that i can use to identify user?
I need something "legally-valid" (I mean that if the user do something illegal with my app, I should be able to track it down)
I cannot just "let user type its phone number" because i need that it's really true. I cannot risk that user type the number of someone else
You can get the phone number; you just have to ask the user for it.
In the past, people have used the device UDID for this sort of thing. The UDID is deprecated now, and new devices may not even have one. You can search on UDID to find out what people are using in place of the UDID -- in particular, look for the OpenUDID and SecureUDID projects. In some cases the device's wifi MAC address can be used, but that brings with it some of the same privacy concerns as the UDID.
You can also just generate and store a globally unique identifier. Search for "GUID" to learn how to do this. With a GUID, you can be virtually certain that the identifier is unique.
It's not clear what you mean by "legally valid". Is that "valid" with respect to privacy laws, cryptography laws, communications regulations, or something else? And in what country?

Resources