etayluz etayluz - 3 months ago 20
iOS Question

Use of undeclared type 'KeychainAccess'

I'm trying to use the KeychainAccess pod at:
https://github.com/kishikawakatsumi/KeychainAccess

However, when I import it I get this error:

Error

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

JAL JAL
Answer

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")
Comments