mirror of
https://github.com/metabolist/metatext.git
synced 2024-11-21 15:50:59 +00:00
Fix push issues
This commit is contained in:
parent
2397758456
commit
ad4e699ce1
2 changed files with 10 additions and 1 deletions
|
@ -19,7 +19,13 @@ extension LiveKeychain: Keychain {
|
|||
|
||||
query[kSecValueData as String] = data
|
||||
|
||||
let status = SecItemAdd(query as CFDictionary, nil)
|
||||
var status = SecItemAdd(query as CFDictionary, nil)
|
||||
|
||||
if status == errSecDuplicateItem {
|
||||
status = SecItemUpdate(
|
||||
genericPasswordQueryDictionary(account: account, service: service) as CFDictionary,
|
||||
[kSecValueData as String: data] as CFDictionary)
|
||||
}
|
||||
|
||||
if status != errSecSuccess {
|
||||
throw NSError(status: status)
|
||||
|
@ -54,6 +60,8 @@ extension LiveKeychain: Keychain {
|
|||
}
|
||||
|
||||
public static func generateKeyAndReturnPublicKey(applicationTag: String, attributes: [String: Any]) throws -> Data {
|
||||
try? deleteKey(applicationTag: applicationTag)
|
||||
|
||||
var attributes = attributes
|
||||
var error: Unmanaged<CFError>?
|
||||
|
||||
|
|
|
@ -124,6 +124,7 @@ public extension AllIdentitiesService {
|
|||
}
|
||||
}
|
||||
.map(Publishers.MergeMany.init)
|
||||
.flatMap { $0 }
|
||||
.ignoreOutput()
|
||||
.eraseToAnyPublisher()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue