How to find identifier in IOS7

来源:互联网 发布:linux u盘安装教程 编辑:程序博客网 时间:2024/05/17 05:54

You cannot get the unique identifier directly in iOS7.

In app delegate, there is a method called "application:didRegisterForRemoteNotificationsWithDeviceToken:", Use this method you can get the deviceToken in NSData, then you can use NSRegularExpression with pattern "[><]" to replace with "" for NSData's description. Then that will be the "unique identifier" you are looking for. 


我们现在不能直接得到唯一表示用 

[[UIDevicecurrentDevice] uniqueIdentifier]


但是我们可以使用"application:didRegisterForRemoteNotificationsWithDeviceToken:"来得到。

0 0