2011-06-02 75 views

回答

8
[[UIDevice currentDevice] uniqueIdentifier] 
0

由於安裝iOS 5.0的這個屬性被棄用,Apple advises您創建自己獨特的應用程序ID:

請勿使用uniqueIdentifier屬性。要爲您的應用創建唯一的 標識符,您可以調用CFUUIDCreate 函數來創建UUID,並使用NSUserDefaults類將其寫入默認數據庫。

相關問題