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

allkeys() #118

Closed Gualax1 closed 5 years ago

Gualax1 commented 5 years ago

Hello, i got a problem when i want to retrieve allkeys from keychain. It retrive me an empty array and .capacity() give me 0 value. But when i want to retrieve an specific key it works... let keychainwraper = KeychainWrapper(serviceName: "keychain", accessGroup:nil)
keychainwraper.set("sam", forKey: "name") print(keychainwraper!.string(forKey: "name")) /// sam

let keys = keychainwraper!.allKeys() print(keys) //[Set([])] print(keychainwraper!.allKeys().count) // 0

im using, 12.1 simulator, xcode 10.1 and swift 4.1

jrendel commented 5 years ago

This has been fixed in v3.2 of the library and changes are in the master branch now. Will try to get CocoaPods updated later tonight.

jrendel commented 5 years ago

This should be available on CocoaPods now.