This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Unique identifier for an iPhone app
Our server database recognize user based on Device UDID, but now UDID is depreciated in IOS 5.. i m not able to use it... Can anyone please help me to find out "How can we Identify the device?".
Thanks in advance.
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).
The agenda for this community driven project is to:
Provide a reliable proxy and replacement for a universal unique device
identifier. That is, persistent and sufficiently unique, on a per
device basis. NOT use an obvious other sensitive unique identifier
(like the MAC address) to avoid further deprecation and to protect
device-level privacy concerns Enable the same OpenUDID to be accessed
by any app on the same device Supply open-source code to generate and
access the OpenUDID, for iOS and Android Incorporate, from the
beginning, a system that will enable user opt-out to match Appleās
initial intent
I personally use `Unique Device Identifier'
Works fine, and Apps got approved from Apple as well. =)
U can use BPXLUUIDHandler as an option to UDID which is depreciated in IOS 5
Use This....the easiest and most appropriate way to obtain a unique identifier is to use the mechanisms Apple explicitly provides for obtaining one[[UIDevice currentDevice] uniqueIdentifier].
Related
The API documentations says that Titanium.Platform.getId() returns the UDID (unique device ID) for android but for iOS this is a unique identifier for a particular installation of the application. It also says that Apple has restricted the access to UUID.
However, if I need to retrieve a unique device ID for an iPhone, is there any way to do it? Or is it not possible at all?
There is no way to get any device unique identifiers in iOS 7 and up, Apple has restricted this due to privacy concerns. The trick to use the MAC address is also no longer working.
You options are the identifier for vender (the one Titanium.Platform.getId() returns).
This one is unique for the device as long as there is app on the device from the same developer.
Another option is to create a unique identifier and save it in the keychain, this way it will be saved there until the user full wipes it's iOS device.
No, you can't. Check this article for some more informations:
http://www.doubleencore.com/2013/04/unique-identifiers/
How are we supposed to uniquely identify devices now that the UDID has been deprecated? I need to be able to uniquely identify a device even if the user uninstalls my app and then reinstall it. The new identifierForVendor doesn't work for this purpose because it will randomly generate again once the user uninstalls the app. I also can't use the MAC address to identify the device because it doesn't work in iOS 7.
The advertisingIdentifier seems to work for my purposes but I heard that if you're not actually using it for advertising Apple will reject your app?
Does anyone know of a way to reliably identify a device?
According to Apple, you should be using the vendor or advertising identifiers. Vendor doesn't work for you obviously, but you are fine to use advertisingIdentifier.
The advertisingIdentifier seems to work for my purposes but I heard that if you're not actually using it for advertising Apple will reject your app?
They are not currently rejecting apps for using avertisingIdentifier in place of uniqueIdentifier as a device ID. I just had a version of my app approved that uses advertisingIdentifier for purposes other than advertising. A bigger negative is that users can change this identifier any time they like, which is guaranteed to mess up your reporting.
Non-public API usage:
Apps are not permitted to access the UDID and must not use the uniqueIdentifier method of UIDevice. Please update your apps and servers to associate users with the Vendor or Advertising identifiers introduced in iOS 6.
If method names in your source code match the private Apple APIs listed above, altering your method names will help prevent this app from being flagged in future submissions. In addition, note that one or more of the above APIs may be located in a static library that was included with your app. If so, they must be removed.
Kindly help me how to i avoid his problem.
Regards
John
Apps are not permitted to access the UDID and must not use the uniqueIdentifier method of UIDevice. Please update your apps and servers to associate users with the Vendor or Advertising identifiers introduced in iOS 6
Theres your answer.
"Starting May 1, the App Store will no longer accept new apps or app updates that access UDIDs. Please update your apps and servers to associate users with the Vendor or Advertising identifiers introduced in iOS 6"
Source
Apple now block any App which accesses the uniqueIdentifier property of UIDevice. Replace any occurrence with the Vendor or Advertising identifiers or use OpenUDID.
NSUUID *uuid = [[UIDevice currentDevice] identifierForVendor];
NSString *uuidString = [uuid UUIDString];
A few StackOverflow questions which may be of help:
Advertising Identifier for devices lower than iOS 6.0
iOS6 UDID - What advantages does identifierForVendor have over identifierForAdvertising?
The advertisingIdentifier and identifierForVendor return "00000000-0000-0000-0000-000000000000"
If you haven't used uniqueIdentifier yourself, then it will be an SDK Library calling it. Normally from an ad network such as Mobclix, AdMob or Smaato. All the popular ad networks have updated SDK's which remove uniqueIdentifier. Check their websites for the latest SDK.
Update
Just seen in the comments you're using PhoneGap, guessing you haven't updated to the latest version.
Apple have started rejecting UDID access now (PhoneGap)
Re: [PhoneGap] Uuids in ios 5 (PhoneGap)
Make sure your using the latest version (2.7.0) from http://phonegap.com/download/ (Released 30 Apr 2013)
I got the same issue and Apple gave me some tips to find out the Places that use "uniqueIdentifier" API call. Even in a binary lib.
"While you may have removed access and usage of UDIDs from your app,
the invalid binary message indicates that your app uses or accesses
UDIDs. Please check your source code for any occurrence of the
"uniqueIdentifier" method; this is the method that returns a device's
UDID.
Additionally, if you are linking an external framework, such as an
advertising library, these third party libraries may be accessing and
using UDIDs. We encourage you to update your libraries to the most
recent versions and use the "nm" tool to determine if the libraries
are calling this method.
For more information on the "nm" tool, please see the manual page for
the "nm" tool in Xcode Tools:
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/nm.1.html
Additionally, if you do not have access to the libraries's source, you
may be able to search the compiled binary using "strings" or "otool"
command line tools. The "strings" tool can output a list of the
methods that the library calls and "otool -ov" will output the
Objective-C class structures and their defined methods. These
techniques can help you narrow down where the problematic code
resides."
Hope it helps
I am using this method to create a Unique Identifier.
Is this now not allowed. It was a month ago when release a previous version of my app.
- (NSString *)uuid
{
CFUUIDRef uuidRef = CFUUIDCreate(NULL);
CFStringRef uuidStringRef = CFUUIDCreateString(NULL, uuidRef);
CFRelease(uuidRef);
return [(NSString *)uuidStringRef autorelease];
}
What else can I use to create a unique identifier.
Cheers
Shane
I have heard some rumours that Apple is rejecting apps for using the iOS5 deprecated method [UIDevice uniqueIdentifier]. Can anyone confirm that they have had their App rejected for this reason? I know of the alternatives to using this deprecated method, but one of our customers is requesting we use a 3rd party library that we know uses this method.
I would be surprised if this is the case as the API method has been deprecated and not made private.
Apple is not rejecting apps because of this. I collect device UDIDs along with tokens within my apps that support push notifications and they have all been approved. UDIDs are simply deprecated, meaning that Apple will eventually not allow you to access them. Everything still works and will be approved.
I heard that Apple deprecated access to UDIDs to prevent developers and third party analysts from being able to identify specific people. If it truly was because of issues with iCloud, Apple would clearly have fixed this instead of inconveniencing everyone else.
Edit: It looks like Apple is rejecting some apps for accessing the device's UDID. Just to be safe, I would use CFUUID to create a random unique identifier. You can use NSUserDefaults or the keychain to save it. The advantage to the keychain is that if the user deletes your app, the keychain items are not deleted so you can still access the UDID if the user reinstalls your app. It will only get deleted if the user restores their device.
Using Identifiers in Your Apps
Starting May 1, the App Store will no longer accept new apps or app updates that access UDIDs. Please update your apps and servers to associate users with the Vendor or Advertising identifiers introduced in iOS 6. You can find more details in the UIDevice Class Reference.
Source: https://developer.apple.com/news/
It appears that App Review is enforcing this rule on apps that transmit the UDID without getting the user's permission -- as suggested by this post -- rather than ones that simply invoke the deprecated API.
We had an update in review for an app that would send the device UDID to our server, on which we would use it to index the user's account. We decided not to take any chances and change our code to generate an app-specific unique identifier, as proposed by documentation on the deprecation of the UDID
now Apps are not permitted to access the UDID and must not use the uniqueIdentifier method of UIDevice. Please update your apps and servers to associate users with the Vendor or Advertising identifiers introduced in iOS 6
NSUUID *uuid = [[UIDevice currentDevice] identifierForVendor];
NSString *uuidString = [uuid UUIDString];
and must to add ADSupport framework
Since May 1, Apple is rejecting all apps which access to the UDID.
But it seems the only thing that they can do is to check if the string "uniqueIdentifier" is in the binary or not.
So even if you don't acces anymore to the uniqueIdentifier of the phone, but you give to one variable the same name, they will find it in the binary and they will reject it cause they can't do the difference.
If you want to know if you binary contain it, you can change the extension of the .ipa (export for ad-hoc deployment) to .zip, unzip it, and do fgrep -R uniqueIdentifier . in the terminal at the payload/ folder.
You can also do this command in your project folder to find the files which contain the string.
This worked for me.
A further question about Bluetooth and iPhone.
Is it possible to discover nearby "non-ios" devices via bluetooth programmatically? The device uses the Hands-free-Profile. When I go like "General > Bluetooth > On" it works fine and I can pair with it. And thats exactly what I want to do but in my own App. I know the official SDK doesn`t support it. So my questions are:
When I`m member of the "Made for iPod"-Program, will I have access to the Hands-free-Profile API?
Important: The device already exists and I have no influence on it. So no possibility to implement
a special ship or so.
Another opportunity I found is the Private Framework BluetoothManager.h. Is it possible to
discover/pair the device with an iPhone?
In one sentence: I want to build an app that exactly does what the Bluetooth-function in the iPhone settings does. Possible?
Thank you
I want to build an app that exactly does what the Bluetooth-function in the iPhone settings does. Possible?
No, it is not possible with official APIs, even if you are a part of the Made for iPhone program.
In one sentence: I want to build an app that exactly does what the Bluetooth-function in the iPhone settings does. Possible?
A preliminary search didn't find the official rule about it, but Apple specifically forbids apps that duplicate the functionality of their built-ins. So, no, your app will almost certainly not get approved.
And I'm pretty sure the T&C forbid interaction with non-Apple-approved devices, but I'm not sure whether they strictly apply that to bluetooth things.
Yes , using the bluetooth private APIs. You can get a list of remote devices, each a BluetoothDevice object, and use the afferent methods to pair or connect.