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. eclipse怎么在项目里面批量替换单词

    先选中你要替换的东东,然后再菜单栏中找到Search→Text→Project(先创建要搜索的project),这样就会在整个项目中查找单词.然后在Search的Console中,单击项目,右键选择R ...

  2. 初识C++ 中的STL

    首先,STL是指standard template library,即C++标准模板库,也叫泛型库. STL提供了三种类型的组件:容器,迭代器和算法,他们都支持泛型程序设计标准. (一)容器: 分为: ...

  3. 中间件——Oracle Fusion Middleware

    Oracle Fusion Middleware定义: 什么是Oracle Fusion Middleware Oracle Fusion Middleware is a comprehensive ...

  4. ffmpeg超详细综合教程——摄像头直播

    本文的示例将实现:读取PC摄像头视频数据并以RTMP协议发送为直播流.示例包含了1.ffmpeg的libavdevice的使用2.视频解码.编码.推流的基本流程具有较强的综合性.要使用libavdev ...

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

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

  6. 杂项-Java:JCP

    ylbtech-杂项-Java:JCP JCP(Java Community Process) 是一个开放的国际组织,主要由Java开发者以及被授权者组成,职能是发展和更新. 1. 中文名:jcp 外 ...

  7. 第七章 JVM体系结构与工作方式

    JVM能跨计算机体系结构来执行Java字节码,主要是由于JVM屏蔽了与各个计算机平台的软件和硬件之间的差异. 7.1 JVM体系结构 7.1.1 何谓JVM 模拟一个计算机来达到一个计算机所具有的计算 ...

  8. WCF服务端返回:(413) Request Entity Too Large

    出现这个原因我们应该都能猜测到,文件传出过大,超出了WCF默认范围,那么我们需要进行修改. 服务端和客户端都需要修改. 第一.客户端: <system.serviceModel> < ...

  9. java 删除文件夹 / 删除某文件夹下的所有文件

    import java.io.File; /*************************删除文件夹delFolder / 删除文件夹中的所有文件delAllFile *start******** ...

  10. Net Framework 4.0 和.Net Framework 4.0 Client Profile

    Net Framework 4.0 和.Net Framework 4.0 Client Profile区别: .Net Framework 4.0毫无疑问就像是.Net Framework 2.0一 ...