etayluz etayluz - 1 year ago 142
iOS Question

Use of undeclared type 'KeychainAccess'

I'm trying to use the KeychainAccess pod at:

However, when I import it I get this error:


KeychainAccess is showing up in Purple and I see it in my Pods target as well.

Answer Source

keychainAccess isn't of type KeychainAccess, it's a Keychain:

private let keychainAccess: Keychain = {
    return Keychain(service: "com.startbox")

KeychainAccess isn't a type, it's a module.

It also may not be necessary to make your keychain a computed property.

private let keychainAccess = Keychain(service: "com.startbox")
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download