Alternative to iPhone device ID (UDID)

简介:

Possible Duplicate:
UIDevice uniqueIdentifier Deprecated - What To Do Now?

Even if Apple was not at Barcelone's MWC (mobile world congress), there was the certitude that getting the deviceID will be deprecated in further iOS SDK.

I do not understand why Apple want to restrict this, but that's not the topic.

I must prepare my application to an alternative because my users are identified and known for a better use of my app (don't need to log, or create an account, for example). And I'm sure I'm not alone in that case.

So anybody know an alternative from getting the deviceID ? Is there other unique identifier, like MAC address, for example ? How do you prepare your app ?

share | edit | flag
 
   
   
you want the iphone device id or sth other? – Anil Mar 9 '12 at 9:28
   
   
I want another unique identifer that deviceId, or another way to identify user. – Martin Mar 9 '12 at 9:41
add comment (requires 50 reputation)

marked as duplicate by casperOne Sep 20 '12 at 11:23

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

3 Answers

up vote 4 down vote accepted

UPDATE

What about using CFUUID to generate a UUID. You can than store it in KEYCHAIN on the very first launch.. you can get it like this...

NSString*uuid = nil;CFUUIDRef theUUID =CFUUIDCreate(kCFAllocatorDefault);if(theUUID){
  uuid =NSMakeCollectable(CFUUIDCreateString(kCFAllocatorDefault, theUUID));[uuid autorelease];CFRelease(theUUID);}

and also by deprecating the uniqueIdentifier method, Apple is suggesting that you don't identify per device but instead per app install. may be tomorrow they might decide to reject your app for doing this .. :/ hoping this helps.

share | edit | flag
 
   
   
Thanks, but it wouldn't be the same if the user delete and install again the app (which, i admit, does not occurs often). Another thing, this UUID is generated on a machine, so may not be unique throught our user list on our server. – Martin Mar 9 '12 at 9:39
   
   
@Martin What about storing the value in keychain...? that wouldn't go away once the app is uninstalled..? and also by deprecating the uniqueIdentifier method, Apple is suggesting that you don't identify per device but instead per app install. may be tomorrow they might decide to reject your app for doing this .. :/ – Ankit Srivastava Mar 9 '12 at 9:49
   
   
@Martin please check the update. – Ankit Srivastava Mar 9 '12 at 10:04
2  
   
You could store this UUID created this way in iCloud and then pull from there if you don't have it stored on the device. That would give you a UUID unique to a certain user, which might be what you want? – mattjgalloway Mar 9 '12 at 10:26
2  
   
does not work in iOS 5 – Abhishek Bedi May 25 '12 at 12:24
show 3 more comments

try this

-(NSString*)getDeviceID
{NSString*uuid =[self gettingString:@"uniqueAppId"];if(uuid==nil ||[uuid isEqualToString:@""]){CFUUIDRef theUUID =CFUUIDCreate(kCFAllocatorDefault);if(theUUID){
            uuid =NSMakeCollectable(CFUUIDCreateString(kCFAllocatorDefault, theUUID));[self savingString:@"uniqueAppId" data:uuid];[uuid autorelease];CFRelease(theUUID);}}return uuid;// this is depreciated  //  UIDevice *device = [UIDevice currentDevice];//  return [device uniqueIdentifier];}
share | edit | flag
 
   
   
Thanks, that's the same answers as below. See my comment. – Martin Mar 9 '12 at 9:39
   
   
then you have to use mac address of the device – hchouhan02 Mar 9 '12 at 10:10
add comment (requires 50 reputation)

Please implement the new logic to get Secure UDID.it is provided by Third Party

Learn about free solution:

This really works fine and is easy to implememt without making it a fuss to replace the deprecated method.

share | edit | flag
 
   
   
Thanks for the link. There are several UID api that are growing around the web. I don't tested one of them yet. – Martin May 25 '12 at 12:19
   
   
The link is broken – André Cytryn Feb 19 at 19:55
   
   
Hi Andre I have updated the link. – Shantanu Feb 20 at 5:40
add comment (requires 50 reputation)
欢迎加群互相学习,共同进步。QQ群:iOS: 58099570 | Android: 572064792 | Nodejs:329118122 做人要厚道,转载请注明出处!


















本文转自张昺华-sky博客园博客,原文链接:http://www.cnblogs.com/sunshine-anycall/p/3330616.html ,如需转载请自行联系原作者


相关文章
|
4月前
|
Web App开发 数据安全/隐私保护 iOS开发
如何获得iphone手机的UDID
如何获得iphone手机的UDID
49 0
|
Web App开发 网络虚拟化 iOS开发
如何获取苹果设备的UDID(iPhone/iPad UDID查询方法)
如何获取苹果设备的UDID(iPhone/iPad UDID查询方法)
|
iOS开发
苹果怎么查看UDID iPhone/iPad查看UDID教程【详解】
苹果怎么查看UDID iPhone/iPad查看UDID教程【详解
|
iOS开发
苹果手机里面的udid怎么查出来
苹果手机里面的udid可通过电脑上的iTunes软件来进行查看。
|
iOS开发
苹果手机里面的 udid 怎么查出来
苹果手机里面的 udid 可通过电脑上的 iTunes 软件来进行查看。具体操作步骤如下:首先使用数据线将苹果手机和电脑进行连接,然后点击打开 iTunes 软件,接着在此页面内点击右上方的 iPhone。
|
iOS开发
苹果怎么查看 UDID iPhone/iPad 查看 UDID 教程【详解】
在开发 iPhone 和 iPad 软件的时候,要使用 UDID 来做真机测试,那么如何查看 iPhone 或者 iPad 的 UDID 呢?下面介绍三种最简单的查看 UDID 的方法,供大家参考!下面就详情来看看。
|
存储 算法 C++
苹果怎么查看UDID iPhone/iPad查看UDID教程【详解】
苹果怎么查看UDID iPhone/iPad查看UDID教程【详解】
|
iOS开发
苹果手机里面的udid怎么查出来
苹果手机里面的udid怎么查出来
|
Windows
如何获取苹果手机的UDID
获取苹果手机的UDID有很多种,比如Xcode,iTunes等等吧,个人比较推荐使用iTunes,因为比较官方,而且苹果电脑自带的有,而且Windows也可以下载安装。 1.下载安装itunes(点击链接即可下载版本为12.5.1)   苹果系统是不用下载的(自带的有),建议更新一下。
1056 0