1
僅在Xcode 8和IOS 10中才會出現問題。 如果我使用XCode 8和IOS 9,它可以正常工作。在swift和IOS 10崩潰時重置鑰匙串
func resetKeychain() {
if !self.keychainItemData.isEmpty {
let tempDict = self.dictToSecItemData(self.keychainItemData)
var junk = noErr
junk = SecItemDelete(tempDict as CFDictionary)
assert(junk == noErr || junk == errSecItemNotFound, "Failed to delete current dict")
}
self.keychainItemData[kSecAttrAccount] = ""
self.keychainItemData[kSecAttrLabel] = ""
self.keychainItemData[kSecAttrDescription] = ""
self.keychainItemData[kSecValueData] = ""
}
斷言總是在IOS 10發生和應用程序崩潰
什麼想法?
我甚至沒有想過它,因爲它是更新之前啓用XCode 8 –
救生員!爲我工作! – Politta