matthewpalmer / Locksmith

A powerful, protocol-oriented library for working with the keychain in Swift.
MIT License
2.92k stars 268 forks source link

Type 'TwitterAccount' does not conform to protocol 'CreateableSecureStorable #158

Open EdmundMai opened 8 years ago

EdmundMai commented 8 years ago

I'm running into errors just from copying and pasting the code from the readme.


struct TwitterAccount: CreateableSecureStorable, GenericPasswordSecureStorable {
  let username: String
  let password: String

  // Required by GenericPasswordSecureStorable
  let service = "Twitter"
  var account: String { return username }

  // Required by CreateableSecureStorable
  var data: [String: AnyObject] {
    return ["password": password]
  }
}

that doesn't work

Ponf commented 7 years ago

@EdmundMai

var data: [String: AnyObject] {

Change AnyObject to Any

jaredegan commented 7 years ago

The readme is out of date with the code.

rain-bason commented 6 years ago

I thought the required for CreateableSecureStorable is data: [String : Any] but Xcode requires me to add createInSecureStore() and updateInSecureStore() what should I do with these methods? No explanation on the readme about this.

It's already 2018, still no update with the readme sample codes? I see updates in the source code so this isn't dead but why the readme isn't updated? If you copy-paste the codes in the readme you'll have a bunch of errors to fix.