matthewpalmer / Locksmith

A powerful, protocol-oriented library for working with the keychain in Swift.
MIT License
2.92k stars 268 forks source link

Enable kSecAttrAccessibleAfterFirstUnlock #169

Open RudyB opened 7 years ago

RudyB commented 7 years ago

I am trying to access a users password from a widget on a locked iPhone. How do I enable kSecAttrAccessibleAfterFirstUnlock with Locksmith?

lohithkorp commented 4 years ago

have you got an answer on this? I need to do the same too..

getaaron commented 4 years ago

Did y'all try looking at the source code? https://github.com/matthewpalmer/Locksmith/search?q=kSecAttrAccessibleAfterFirstUnlock&unscoped_q=kSecAttrAccessibleAfterFirstUnlock

lohithkorp commented 4 years ago

yes @getaaron ! I inhertied my class have from SecureStorable and then set the accessible variable as public var accessible: LocksmithAccessibleOption? = {return .afterFirstUnlock}() as suggested by Matt in one of the other issues. But, the keychain items are not accessible from background.

At this moment, the accessible is set to default and it is whenUnlocked. Can you please explain how I can change this?