Post marked as solved
Click to stop watching this thread.
You have stopped watching this post. Click to start watching again.
Post marked as solved with 2 replies, 0 views
Eskimo, thank you so much for the suggestion. With that I think I'm now on the right track.
I have the following options set when adding the item to the keychain:
swift
let flag = SecAccessControlCreateFlags.userPresence
let sacResult = SecAccessControlCreateWithFlags(kCFAllocatorDefault,
kSecAttrAccessibleWhenPasscodeSetThisDeviceOnly, flag, &error)
and have
swift
kSecUseAuthenticationUI as String: kSecUseAuthenticationUIFail
in the attributes for SecItemCopyMatching
On my own watch with passcode on I get the "User interaction is not allowed" error, which seems correct.
I didn't see that in the simulator where the passcode cannot be set - that shows "No error."
I need to verify with passcode off on a device but this looks really promising. Thank you