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 ?

asked Mar 9 '12 at 9:22
Martin
2,19611635
 
   
   
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

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.

answered Mar 9 '12 at 9:32
 
   
   
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];}
answered Mar 9 '12 at 9:29
 
   
   
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.

answered May 25 '12 at 12:14
Shantanu
838417
 
   
   
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)

Alternative to iPhone device ID (UDID)的更多相关文章

  1. (转)iPhone开发关于UDID和UUID的一些理解

    转自:http://www.cocoachina.com/bbs/read.php?tid=92404另外配合参考这里:https://github.com/ymsheng/ios-deviceUni ...

  2. iPhone开发关于UDID和UUID的一些理解【转】

    原文地址:http://blog.csdn.net/xunyn/article/details/13629071 一.UDID(Unique Device Identifier) UDID是Uniqu ...

  3. iPhone开发关于UDID和UUID的一些理解

    一.UDID(Unique Device Identifier)  UDID是Unique Device Identifier的缩写,中文意思是设备唯一标识.  在很多需要限制一台设备一个账号的应用中 ...

  4. Device ID

    参考文章 一.CFUUID (Deprecated) 二.UDID (Deprecated) 三.NSUUID (ios6.0 and later) NSString *uuid = [[NSUUID ...

  5. otg device id pin 探討

    Platform : Qualcomm MSM8937 PMIC : Qualcomm PMI8940 OTG base on USB2.0,增加 device 可當 host 也可當 periphe ...

  6. Android Unique Device ID

    There are several occasions when the unique identifier of a device is required. For instance you nee ...

  7. android device ID获取

    Android  Device ID是Android用户在Google认证过手机的设备唯一标识,当然国内很多Android手机没有经过Google认证,所以一般没有Google官方Android de ...

  8. STM32唯一ID(Unique Device ID)的读取方法

    每一个STM32微控制器都自带一个96位的唯一ID,也就是Unique Device ID或称为UID,这个唯一ID在任何情况下都是唯一的且不允许修改.    在开发过程中,可能需要用到这个UID,比 ...

  9. 获取iPhone手机的UDID和设备名称.

    关于设备名称: iPhone的设备名称也可以在手机上面查看到:设置-通用-关于本机-名称(设备名称是可以自己改的) 关于UUID: 什么?用了iPhone这么久你不知道什么叫UDID! UDID 是由 ...

随机推荐

  1. Oracle记录(二) SQLPlus命令

    对于Oracle数据库操作主要使用的是命令行方式,而所有的命令都使用sqlplus完成,对于sqlplus有两种形式.就我个人而言,还是比较喜欢UNIX与Linux下的Oracle.呵呵 一种是dos ...

  2. python 数据库查询结果转对象

    #coding:utf-8 from json import dumps, loads, JSONEncoder, JSONDecoder import pickle from app.model.J ...

  3. 在rebar发布的项目中添加监视工具

    默认使用rebar创建的项目没法使用observer,可以如下操作 修改app.src {application, tcp_server, [ {description, ""}, ...

  4. 1125 Chain the Ropes

    题意:略. 思路:思考一下,最先拿去对折的绳子会参与之后的每次对折,而对一条绳子而言,对折的次数越多剩下的就越短,因此,要让最终的结果尽可能长,应该先让较短的绳子先对折. 代码: #include & ...

  5. git学习2 - 安装

    msysgit是Windows版的Git,从https://git-for-windows.github.io下载(网速慢的同学请移步国内镜像),然后按默认选项安装即可. 安装完成后,在开始菜单里找到 ...

  6. java NIO(转载)

    (原文地址:https://zhuanlan.zhihu.com/p/23488863) NIO(Non-blocking I/O,在Java领域,也称为New I/O),是一种同步非阻塞的I/O模型 ...

  7. 不需要SDK调用图灵机器人的方法

    图灵机器人的调用其实就是你给服务器发一个文字消息过去,他回你一个,看起来模仿人类对话一样. 不知道为什么要弄个SDK这么麻烦的方法,以前的接口官网上已经没有了,但是还是可以用的.返回的是JSON但也懒 ...

  8. No mapping found for HTTP request with URI [/jiaoyu/student/add] in DispatcherServlet with name 'SpringMVC'

    项目是使用spring MVC (1)在浏览器中访问,后台总报错: No mapping found for HTTP request with URI [/exam3/welcome] in Dis ...

  9. Delphi IOS 上架

    http://docwiki.embarcadero.com/RADStudio/Seattle/en/IOS_Mobile_Application_Development http://docwik ...

  10. Python基础学习四 函数

    1.内置函数 Python内置了很多有用的函数,是可以直接调用的. 参考链接:https://docs.python.org/3/library/functions.html 调用函数的时候,如果传入 ...