0

我最近将我的 Xcode 更新为 Xcode5 GM。我注意到这删除了我的 iOS6 SDK,所以我手动将它复制到 Developer/SDKs 中。Xcode 可以很好地识别这个 SDK。但是,当我尝试使用它编译我的应用程序时,当我尝试检索设备的 UDID 时,它会引发编译器错误。

有谁知道为什么会这样?UDID API 不应该在 iOS6 SDK 中仍然可用吗?

谢谢,
泰加

4

2 回答 2

1

UDID弃用。它在`iOS 5,Apple 官方文档中已被弃用

 uniqueIdentifier

 An alphanumeric string unique to each device based on various hardware details. (read-only) 
 (Deprecated in iOS 5.0. Use the identifierForVendor property of this class or the 
 advertisingIdentifier property of the ASIdentifierManager class instead, as appropriate, or use 
 the UUID method of the NSUUID class to create a UUID and write it to the user defaults database.)

 @property(nonatomic, readonly, retain) NSString *uniqueIdentifier

(以上摘自 Apple 文档。)

请注意,bengoesboom即使它仍然可用,一旦您提交给 Apple 进行审核,您的应用程序也会被自动拒绝。这可能是它被完全删除的原因。

于 2013-09-16T18:57:14.787 回答
0

这似乎在从 App Store 下载的 Xcode 官方版本中运行良好。

于 2013-10-19T20:37:12.187 回答