This repository has been archived by the owner on Aug 24, 2019. It is now read-only.
Added support for iOS 8/OS X 10.0 AccessControl (Touch ID) #76
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please don't automatically merge this!
I've made some modifications to the
SSKeychainQuery
class by adding some additional properties and methods that essentially allow you to use Touch ID with SSKeychain.The main change is that i've modified the
save:
method to support thekSecAttrAccessControl
andkSecUseNoAuthenticationUI
attributes allowing you to specify aSSKeychainAccessControl
object via the newaccessControl
property (was wrapping this in anNSObject
the best approach?).I have also made changes to
fetch:
andfetchAll:
allowing you to pass in thekSecUseOperationPrompt
(displayed when Touch ID is presented) viauseOperationPrompt
.Finally, I've added a
update:
method as there was no existing wrapper aroundSecItemUpdate()
.With all the above changes, You can now do something like the following to protect items with Touch ID:
Then, you can fetch them like so:
I've not really done much when it comes to maintaining backwards compatibility but I've tested my branch when compiled against the iOS 7 SDK and it still compiles but I would like it if somebody else could check over everything beforehand.
Apple Sample Code: https://developer.apple.com/library/prerelease/ios/samplecode/KeychainTouchID/Introduction/Intro.html
Let me know what you think.
Liam