Hello,
I'm experiencing a weird issue on the iOS 15 simulator (unfortunately I don't have a device with 15 installed yet).
The issue I see is that the call to SecItemAdd
returns OSStatus -25293 (errSecAuthFailed
).
The attributes dictionary passed looks like this:
var query: [String : Any] = [
kSecClass as String: kSecClassGenericPassword,
kSecAttrAccount as String: key,
kSecAttrService as String: service,
kSecAttrAccessControl as String: getSecAccessControl(),
kSecUseAuthenticationContext as String: context,
kSecValueData as String: data
]
the getSecAccessControl
returns a SecAccessControl
created like this:
access = SecAccessControlCreateWithFlags(nil,
kSecAttrAccessibleWhenUnlockedThisDeviceOnly,
.userPresence,
&error)
if I do not add the kSecAttrAccessControl item I don't see any error.
The same code works as expected on the simulator with iOS 14. Looking at the documentation didn't help, anybody has hints about this? Maybe it's bug I'm not aware of?
Thank you in advance