iOS:mobile sim verification code from app - ios

i am doing iOS app having a concept of sending verification code to the mobile no from the same mobile so that it will get verified and give sms back to me. But i need some unique id for that process.Same this kind of process is using by the whats app and other chatting apps.
1)my problem is i am able to send the message to the same mobile no and receiving message from it but i need some unique identification number to the particular mobile. so that if we place sim card in the other mobile the unique identification in may not collide .

As apple has stopped accessing device UDID's programmatically. You can use vendor id as unique identifier. Vendor id is different for same app on different device.

If I am correct you are looking for an unique identification for a specific mobile number not for the device. UDID will be different for different devices and vendor id will get changed when the vendor apps are deleted. The only way is to use the mobile number as the identification number.

you can use OpenUDID.
OpenUDID is a drop-in replacement for the deprecated uniqueIdentifier property of the UIDevice class on iOS (a.k.a. UDID) and otherwise is an industry-friendly equivalent for iOS and Android, and most recently Windows C# and Silverlight (see links above).
Here is the link:
https://github.com/xaviermichel/OpenUDID
You app will not be rejected because of OpenUDID. OpenUDID supports from version 5

Related

Get device UDID (40 digit id) programmatically [duplicate]

This question already has answers here:
UIDevice uniqueIdentifier deprecated - What to do now?
(32 answers)
Closed 5 years ago.
In my app, I am trying to get all information of the device and to be displayed in app screen.
I got some of the informations, but not getting code to obtain UDID, Serial number and model identifier of a device, what we can able to see in iTunes.
I can able to get UUID, but my request is to get UDID of the device. I got some apps in which they are getting device info like this.
I will be very helpful if I get any solution in this.
Thanks in advance.
You can't as of iOS 6.
Link #1
Money quote:
As reported by 9to5Mac (and confirmed by Macworld), Apple alerted
developers of a cut-off date for new apps or app updates that access
an iOS device’s UDID (Universal Device ID), an area of security and
privacy concern.
Link #2
Extended money quote:
With iOS 6 Apple has also completely eliminated its controversial
Universal Device IDs (UDID) and replaced it with a more
privacy-friendly way for application vendors and advertisers to
identify specific devices, Hall said,
Apple’s UDIDs are basically a set of alphanumeric characters that are
used to uniquely identify an iPhone or iPad. The numbers are designed
to let application developers track how many users have downloaded
their application and to gather other information for data analytics.
From the same article, the way to go now is:
With the new iOS 6 the company has gone one step further by
eliminating UDIDs completely and replace with a set of three new devie
identifiers. One is a vendor specific identifier that can be used by
application vendors to recognize specific devices, another is designed
for use by online advertisers and the third is an application-specific
ID. Unlike UDID’s, the new identifiers are not persistent and can be
cleared, though the device has to be completely reset to get rid of
the advertiser identities, Hall said.
In conclusion, the correct way is to either (a) use UUID or (b) ask your user for the device's UDID.
You can use this (Swift 3):
UIDevice.current.identifierForVendor!.uuidString

How to identify iOS device uniquely instead of using UUID and UDID [duplicate]

This question already has answers here:
Unique Identification of iOS device for iOS 7.0 and above
(6 answers)
Closed 6 years ago.
In my iOS app, I have to restrict the user to use iOS app per device. To do this I found a solution that we can use the UUID (Universally Unique Identifier) or UDID (Unique Device Identifier). But according to this answer I can't use UUID, because if app gets deleted or reinstalled UUID has been getting changed and I don't want this. Also Apple rejects apps if app uses UDID.
Is there any way to identify iOS device uniquely.
Apple has done away with the approach of UDIDs and will reject apps that use the same for unique device identification.
Source: TNW
What you are looking for is Vendor ID
I'm using this library for my projects, and it's working like a charm, please try :
https://github.com/blackpixel/BPXLUUIDHandler
easy to use :
Import BPXLUUIDHandler.h
Retrieve the UUID with
[BPXLUUIDHandler UUID]
Thats all...
Here is some info from project's github page :
As of iOS 5, Apple has deprecated the device unique identifier api and
hasn’t provided a friendly Obj-C replacement, instead recommending
CFUUIDCreate and NSUserDefaults.
CFUUIDCreate isn’t very complicated and neither is NSUserDefaults, but
this solution fails in a few different ways:
It’s not a quick one-shot call to get the UUID; you have to write your own wrapper to make it friendly
It doesn’t persist; deleting the app blows away the UUID (can be persisted if stored in the keychain though)
There’s no way to share it between apps

Unique device identification for ios

I have a HTML/JS/CSS app which I wish to convert to an ios app using phonegap. In my application, I require to identify each device uniquely. From iOS 7 Apple does not accept app that Fetch UDID. I want to achieve this for ios4+ to latest. I have seen one plugin listed at https://build.phonegap.com/plugins/1112. One additional question related to this plugin is if I use a plugin which relies on keychain then what is the risk factor, i.e., under which circumstances is the keychain reset or cleared?
This is not common way but it may be helpful.
You can use service http://get.udid.io to get real UDID of device.
Here is repo with example of usage https://github.com/vladignatyev/udidio-example
Per swift, the latest way I've been doing this is:
var vendorDeviceId = UIDevice.currentDevice().identifierForVendor.UUIDString
This is correct, the UUID is now unique per app install, not device. If the user re-installs your app he will be assigned a new unique identifier (different from the last one).
According to Cordova documentation here's the way to get device UUID
var string = device.uuid;
Note that for iOS the UUID for a device is different from each app. This UUID is created on your app first run, and changes when you delete and re-install your app.
iOS Quirk
The uuid on iOS uses the identifierForVendor property. It is unique to the device across the same vendor, but will be different for different vendors and will change if all apps from the vendor are deleted and then reinstalled. The UUID will be the same if app is restored from a backup or iCloud as it is saved in preferences. Users using older versions of this plugin will still receive the same previous UUID generated by another means as it will be retrieved from preferences.
You can use my indentifier for vendor plugin
https://github.com/jcesarmobile/IDFVPlugin
It uses the native identifier for vendor https://developer.apple.com/library/ios/documentation/uikit/reference/UIDevice_Class/Reference/UIDevice.html#//apple_ref/occ/instp/UIDevice/identifierForVendor

iOS 8 Unique Identifier (Serial Number preferred)

I am working on an enterprise app and need access to programmatically retrieve the device's serial number. Is there an API or any documentation on how to retrieve this in iOS 8? From what I can tell, this functionality has been removed in iOS 8.
Is there a suitable replacement identifier for the serial? I need something that is reliable and will never change even if the device is reset.
It will be for enterprise usage so App Store approval is not a concern.
You're up a creek here. The two "tracking" features are Advertising Identifier and Identifier for Vendor. The former can be reset within the Settings app quite easily while the latter will reset once the user uninstalls all apps with the root bundle identifier associated with the app suite. Both also change with a device reset of course.
If you're deploying the app with an MDM solution you will have access to that device's UDID as it still flows forward to MDM servers, you just can't access it programmatically in your code. The complete deprecation of UDID, serial number and MAC address (even with private APIs) stomped all over some custom utilities I wrote within our Enterprise to try and accomplish something similar to what you're looking to do. If you find somethingthats consistent I'd love to see the follow-up!
EDIT:
I had an epiphany while circling back to this situation again. If you are in fact using AirWatch (I can't speak to Mobile Iron, etc) you can setup the console to send a keychain value to each device at the time of app install. From there the app will be able to consume the value AirWatch sends down. The same goes for any attribute that AirWatch harvests for the device (serial, UDID, MAC, etc). While this workaround comes with a big caveat (using AirWatch for deployment) it will work. Since Apple neutered all Serial Number work arounds win iOS8 this is the most viable option I have found.

Finding IMEI number using Objective-C [duplicate]

This question already has answers here:
How to get IMEI on iPhone?
(7 answers)
Closed 2 years ago.
I need to find a way to get the IMEI number of an iPhone device. This question is not a duplicate.
I have gone through several forums including SO, and had no luck finding an answer.
Some say Apple doesn't allow developers to see the IMEI number (SO post), and some say to use UDID instead (SO post). Some say that UDID is deprecated (in iOS 7).
I need to know the following:
1.) Does Apple permit developers to retrieve the IMEI number of the device?
2.) How can i programatically do it?
3.) In case if Apple doesn't allow developers to gather the IMEI number, do they provide any other unique number for the device?
4.) Some suggest to use Telephony framework. If i do so, will apple reject my application?
Apple does not allow you to identify a device any more.
UDID, MAC address and all other device identifiers are no longer accessible or allowed by Apple.
Apple suggest that you use either UUID (which you will need to store your self or), identifierForVendor or advertisingIdentifier.
Apple is now also rejecting app that use the advertisingIdentifier and not showing any advertisements apps.
Any means to get the IMEI number are using private methods, which is also not allowed by Apple anymore. And your mobile app might/will get rejected because of this.
Unfortunately, there is no way to get a unique identifier for a device which will always remain the same. Apple no longer allows you to access the UDID. And in iOS 7, all devices' MAC addresses return the same value, so that is no longer useful either.
However, iOS does now give access to two types of identifiers which can be used to identify a device. They are:
Vendor ID - [UIDevice identifierForVendor]. This is a unique identifier which is the same for all apps from the same vendor or company. It will remain the same, so long as the user has at least one app from the vendor installed on their device. So if you have 3 apps, the vendor ID will remain the same unless the user uninstalls all three apps, and then reinstalls. This is not so useful if you only have one app - if the user deletes it and then reinstalls it, it will change.
Advertiser ID - [UIDevice advertisingIdentifier]. This is a unique identifier meant for advertising purposes. But if you use it for non-advertising purposes they, for the most part, won't care. Under most circumstances, the advertising identifier will not change, even if the user deletes and reinstalls the app. However, there is an option in the iOS settings to reset the advertising identifier, which will change it. This is meant to that users can choose to disassociate themselves from any advertising information which has been collected about them. But this is a very advanced setting and I doubt that many users would do this frequently enough that it would be a problem for you.
You can obtain IMEI using private frameworks -See this Question but probably your app will be rejected from app store then.
If you want to obtain some device identifier to use in your application you must use uniqueIdentifier property defined in UIDevice class
(Available in iOS 6.0 and later):
NSString *UDID = [[[UIDevice currentDevice] identifierForVendor] UUIDString];
You can save UUID in keychain and user it as unique number. It won't change until user will reset iOS.
If you want to obtain the IMEI there is no way (on a non-jailbroken device). If you wish to identify the user take a look at this answer. Please pay attention to all documentation/answers written before iOS7 since things have changed.

Resources