I am using KeychainItemWrapper class to store and retrieve the value in Keychain. On random scenario I am getting Keychain value as a empty string from Keychain store.
In KeychainItemWrapper class mentioned that this class is provided by Apple. Please correct me if i am wrong.
I googled for the the solution and added the following code in KeychainItemWrapper class:
==> [updateItem setObject:(id)kSecAttrAccessibleAfterFirstUnlock forKey:(id)kSecAttrAccessible];
instead of :
==>[updateItem setObject:(id)kSecAttrAccessibleWhenUnlocked forKey:(id)kSecAttrAccessible];
in "writeToKeychain" method. But this code is not getting executed when Keychain returns empty value string.
Please help me to resolve this issue.
Most of keychain empty happening iOS 10.3.2