i'm use keychain in my app with keychainitemwrapper.
So, i did update 'kSecAttrAccessible' use setObject:(id) method.
But errors occur. Like this,
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Couldn't update the Keychain Item.'
and this is my source
KeychainItemWrapper *wrapper = [[KeychainItemWrapper alloc] initWithIdentifier:@"UserData" accessGroup:@"49YVVGB32W.com.covimdm.daelim.pushData"];
NSString *PushData = [NSString stringWithFormat:@"%@::%@::%@", sLoginId, [[[PushManager defaultManager] info] pushServiceID], [[[PushManager defaultManager] info] host]];
[wrapper setObject:PushData forKey:(id)kSecValueData];
[wrapper setObject:(id)kSecAttrAccessibleAfterFirstUnlock forKey:(id)kSecAttrAccessible];
The part where the error occurs is the fourth line code.
[wrapper setObject:(id)kSecAttrAccessibleAfterFirstUnlock forKey:(id)kSecAttrAccessible];
i don't know why error occurs on and over again.