Closed vitbulio closed 4 years ago
Problem with getting sync items has been solved. First, I'm getting all keys let allKeys = Keychain.allKeys(.internetPassword)
Then in forEach loop need's create keychain let keychain = Keychain(server: url, protocolType: ProtocolType.init(rawValue: protocolType) ?? .https, accessGroup: Consts.groupIdentifier)
, get password and get attributes (if needed). We can get url in forEach loop like this let url = URL(string: $0.0)
. After all, I'm logging the same iCloud on my Mac. After creating and sync passwords in your app, you can see immediately your saved data in Mac keychain. But I don't see that in saved passwords in my iPhone. Why?
Solved. Saved passwords shouldn't show in iPhone settings -> passwords and accounts. Just login the same iCloud account for different devices.
Hello. I'm using your keychain wrapper for saving and sharing passwords. All working fine. And now, I want to save these passwords in iCloud. There's no any errors when I saved password in try block, but when I trying to get my passwords
Keychain.allItems(.internetPassword)
, I'm getting only not sync items. What's the problem? My code for saving password:let keychain = Keychain(server: serverUrlString,
protocolType: protocolType,
accessGroup: Consts.groupIdentifier, authenticationType: .default)
.synchronizable(true)
.comment(comment)
.label(label)
try keychain.set(inputPassword, key: username, ignoringAttributeSynchronizable: false)