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. 使用spring框架的JdbcTemplate实现对Oracle数据库的简单操作实例

    最近实现了一个小功能,针对Oracle数据库两张关联表进行查询和修改,因为比较简单,所以选择了spring框架里的JdbcTemplate.JdbcTemplate算是老古董了,是当年spring为了 ...

  2. 64位linux下rpm安装mysql的5.5.55版本

    昨天同事开了个阿里云环境,让我帮他安装mysql数据库,本想着很简单的一件事,结果还是折腾了一番.坑很多,一路趟过,一个接一个,只能硬着头皮冲. 首先是下载压缩包,因为采用了rpm安装方式,所以下载的 ...

  3. Google Cloud VM上在线扩硬盘

    Google Cloud VM是可以在线扩展Disk的大小的. 一.创建VM和磁盘 比如我有一台VM,附加了一块Disk,大小是120GB.如下图: 在VM中进行格式化: mkfs.ext4 -F / ...

  4. POJ2142(扩展欧几里得)

    The Balance Time Limit: 5000MS   Memory Limit: 65536K Total Submissions: 5991   Accepted: 2605 Descr ...

  5. 数据科学:Pandas 和 Series 的 describe() 方法

    一.Pandas 和 Series 的 describe() 方法 1)功能 功能:对数据中每一列数进行统计分析:(以“列”为单位进行统计分析) 默认只先对“number”的列进行统计分析: 一列数据 ...

  6. 分布式缓存系统 Memcached 主线程之main函数

    前两节中对工作线程的工作流程做了较为详细的分析,现把其主要流程总结为下图: 接下来本节主要分析主线程相关的函数设计,主函数main的基本流程如下图所示: 对于主线程中的工作线程的初始化到启动所有的工作 ...

  7. 1107 Social Clusters

    题意:给出n个人(编号为1~n)以及每个人的若干个爱好,把有一个或多个共同爱好的人归为一个集合,问共有多少个集合,每个集合里有多少个人? 思路:典型的并查集题目.并查集的模板init()函数,unio ...

  8. 根文件系统的构建与分析(三)之根文件目录及最简/dev目录

    根文件系统的构建与分析(三) 转载请注明 http://blog.csdn.net/jianchi88   Author:Lotte   邮箱:baihaowen08@126.com 一.FHS(Fi ...

  9. Linux性能监测:CPU篇

    CPU 也是一种硬件资源,和任何其他硬件设备一样也需要驱动和管理程序才能使用,我们可以把内核的进程调度看作是 CPU 的管理程序,用来管理和分配 CPU 资源,合理安排进程抢占 CPU,并决定哪个进程 ...

  10. Deep Learning 学习笔记(8):自编码器( Autoencoders )

    之前的笔记,算不上是 Deep Learning, 只是为理解Deep Learning 而需要学习的基础知识, 从下面开始,我会把我学习UFDL的笔记写出来 #主要是给自己用的,所以其他人不一定看得 ...