1

I wanna save login credentials in my app using the iOS keychain under swift. I downloaded the SwiftKeychainWrapper and watched a few youtube tutorials. Following these 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?

I also checked out 1-2 other github projects about the keychain like Locksmith which doesn't seem to make me import that framework manually either.

Cheers

Pvt. Joker
  • 155
  • 1
  • 10
  • Xcode automatically links used system frameworks. There's a setting somewhere in the Xcode project file. – HAS Mar 23 '16 at 10:49
  • Sorry but I still don't get it completely. Does this mean I do have to make some setting at least or is that the default behaviour and I'm fine just using the SwiftKeychainWrapper.swift file? – Pvt. Joker Mar 23 '16 at 11:08
  • Usually you don't need to do anything, just import it in your source file and you're good to go :) – HAS Mar 23 '16 at 11:10
  • 1
    Wait, "import in in your source file" - so I do need to import `import Security` somewhere? – Pvt. Joker Mar 23 '16 at 11:12

0 Answers0