原理:程序啟動(dòng)時(shí)將UUID存入鑰匙串,取得時(shí)候取出鑰匙串中的UUID
1.使用KeychainItemWrapper
鏈接:http://m.itdecent.cn/p/2741f0124cd3
2.使用鑰匙串存儲(chǔ)
http://m.itdecent.cn/p/f8f380cb06cb
http://m.itdecent.cn/p/9188235eedab
3.自己封裝了下
https://github.com/WuJiForFantasy/WJKeyChain
注意:如果更新了provisioning profile的話, Keychain data會(huì)丟失.所以我們應(yīng)該將UUID在NSUserDefault
備份.