Reset Keychain in swift and IOS 10 crash
<p>The problem happen on only in Xcode 8 and IOS 10.
If I use XCode 8 and IOS 9 it is working perfectly.</p>

<pre><code>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] = ""
}
</code></pre>

<p>The assert is always happening in IOS 10 and the app crash</p>

<p>Any Ideas?</p>