iOS 10.3 還未正式發(fā)布诗赌,beta 版中一個(gè)關(guān)于keychain 特性的小修改丢郊,就已經(jīng)引起了廣泛的關(guān)注。
改動(dòng)如下:
如果 App 被刪除彩掐,之前存儲于 keychain 中的數(shù)據(jù)也會一同被清除构舟。
如果使用了 keychain group,只要當(dāng) group 所有相關(guān)的 App 被刪除時(shí)堵幽,keychain 中的數(shù)據(jù)才會被刪除狗超。
這一改動(dòng),雖未經(jīng)官方公布朴下。但已在論壇帖子里得到了 Apple 員工的確認(rèn)努咐,原文如下:
This is an intentional change in iOS 10.3 to protect user privacy. Information that can identify a user should not be left on the device after the app that created it has been removed.
It has never been a part of the API contract that keychain items created by an app would survive when the app is removed. This has always been an implementation detail.
If a keychain item is shared with other apps, it won’t be deleted until those other apps have been deleted as well.
如果這是這樣的話,那么keychain存在還有什么意義么殴胧?
還有蘋果現(xiàn)在越來越注重用戶的隱私渗稍,就前幾天對于使用JSPatch熱更新的機(jī)制的應(yīng)用發(fā)送的郵件來看佩迟,蘋果似乎要在這方面有動(dòng)作了,我想說竿屹,蘋果爸爸這次難道真的要為Swift和OC兩個(gè)親兒子出頭了嗎报强?
其實(shí)我也覺得 app 都刪了 keychain 還在是挺不合理的一件事兒。在隱私保護(hù)上還是可以看得出 Apple 還是一直在作為拱燃。
關(guān)于keychain的使用秉溉,大家可以看我的之前的文章
由于蘋果頻繁的更新,之前的一些東西已經(jīng)不能使用https://forums.developer.apple.com/message/210531#210531