-
Notifications
You must be signed in to change notification settings - Fork 266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not able to downgrade the LocksmithAccessibleOption from "unlock" to "afterFirstUnlock" #190
Comments
I encounter this also. What I notice is that the keychain that was stored using the "unlock" accessible option can't be access or delete when you change to "afterFirstUnlock" What I did is first check if data already exists using the "afterFirstUnlock" then if not I'll pull back by checking using the "unlock" accessible options. If the data is stored in the "unlock" accessible options I'll copy it over to "afterFirstUnlock" and delete the old data to avoid redundancy |
"first check if data already exists using the "afterFirstUnlock" then if not I'll pull back by checking using the "unlock" accessible options. If the data is stored in the "unlock" accessible options I'll copy it over to "afterFirstUnlock" and delete the old data to avoid redundancy" -- > How I'm suppose to handle that. I'm using the protocol based approach. I'm attaching my code and please let me know how I can handle that: private let UsernameKey = "com.xxxxx.usernameKey" struct Autorization {
} extension Autorization {
} extension Autorization: CreateableSecureStorable { } extension Autorization: GenericPasswordSecureStorable { |
I'm not sure how can I change your code, but here is part of my code: In a helper file:
then I created an extension:
I'm not sure if this is the ideal way, but it does works the way we need it. |
"else if let dataTemp = Locksmith.loadDataForUserAccount(userAccount: username)" statement returns nil even if there is data in the keychain for the same account. |
In earlier version of my app the LocksmithAccessibleOption was default. Now I want to change it to "afterFirstUnlock". for that I added following code in my protocol
var accessible: LocksmithAccessibleOption? {return .afterFirstUnlock}
But after using this I'm not able to either delete or access the keychain item at all.
Help me here please.
The text was updated successfully, but these errors were encountered: