jrendel / SwiftKeychainWrapper

A simple wrapper for the iOS Keychain to allow you to use it in a similar fashion to User Defaults. Written in Swift.
MIT License
1.59k stars 339 forks source link

Under swift, do I need to import the security framework manually to use the keychain? #36

Closed jo-ba closed 8 years ago

jo-ba commented 8 years ago

Hello there, following some tutorial videos I copied the KeychainWrapper.swift file to my project and started using the provided functions to store some strings. Everything works fine but now I wonder about the need for the security framework which I didn't import manually. Is this something I still need to do in swift? I can Cmd+click those kSec keys in the wrapper and it sends me to the security framework - does this mean it's "built in" into swift now or something like that?

If I do need that framework why does it work right now "without" it? Are my strings saved but not encrypted or something like that?

Btw: I asked that on SO as well but the answers weren't completely satisfying thats why I ask here now.

Thanks a lot in advance

jrendel commented 8 years ago

Thats an interesting question. I have not needed to, but like you said, we're referencing constants used in the Security framework. Unfortunately, I don't have an answer for you on this one right now.