Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Improve on KeychainItemAccessibility #159

Closed
wants to merge 2 commits into from
Closed

Improve on KeychainItemAccessibility #159

wants to merge 2 commits into from

Conversation

sbertix
Copy link
Contributor

@sbertix sbertix commented Sep 29, 2020

Version and platform specific logic in order to bypass deprecation warnings, fixing #156.

  • Update NSKeyedArchiver and NSKeyedUnarchiver methods
  • Obfuscate kSecAttrAccessibleAlways and kSecAttrAccessibleAlwaysThisDeviceOnly

Defaulting .always to .afterFirstUnlock, and .alwaysThisDeviceOnly to .afterFirstUnlockThisDeviceOnly, on iOS 12.0 and above, my initial implementation, didn't feel like the optimal choice.
It truly felt like the only sensible thing to do was marking .always and .alwaysThisDeviceOnly as unavailable for everyone, while allowing users that genuinely need to rely on those cases to pass them themselves, with the addition of a .custom case.

I did not include macCatalyst in the #available statements, as the minimum Swift version for using the library is still set to 4.1.

@sbertix sbertix marked this pull request as draft September 29, 2020 12:05
@sbertix sbertix marked this pull request as ready for review September 29, 2020 13:00
@sbertix sbertix mentioned this pull request Sep 29, 2020
7 tasks
@sbertix sbertix changed the title Bypass deprecation warnings Improve on KeychainItemAccessibility Sep 29, 2020
@sbertix sbertix closed this Sep 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant