5 Commits
1.1.1 ... 1.1.2

Author SHA1 Message Date
Aleksey Zgurskiy
b9c0749257 Finish 1.1.2 2020-03-08 17:43:21 +02:00
Aleksey Zgurskiy
d9814c2cc8 Update version 2020-03-08 17:43:09 +02:00
Aleksey Zgurskiy
6d0ba0d767 Merge branch 'feature/keychain-protocol' into develop 2020-03-08 17:42:28 +02:00
Aleksey Zgurskiy
0604692010 Add keychain protocol 2020-03-08 17:42:22 +02:00
Aleksey Zgurskiy
d2bc31815a Finish 1.1.1 2020-02-04 17:11:07 +02:00
2 changed files with 17 additions and 3 deletions

View File

@@ -302,7 +302,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.1.1;
MARKETING_VERSION = 1.1.2;
PRODUCT_BUNDLE_IDENTIFIER = "com.mr-noone.keychain-kit";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
@@ -327,7 +327,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.1.1;
MARKETING_VERSION = 1.1.2;
PRODUCT_BUNDLE_IDENTIFIER = "com.mr-noone.keychain-kit";
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;

View File

@@ -8,7 +8,21 @@
import Foundation
public struct Keychain {
public protocol KeychainProtocol {
func get(_ key: String) throws -> Data
func get(_ key: String) throws -> String
func get(_ key: String) throws -> UUID
func get<T>(_ key: String, decoder: JSONDecoder) throws -> T where T: Decodable
func set(_ data: Data, for key: String) throws
func set(_ value: String, for key: String) throws
func set(_ uuid: UUID, for key: String) throws
func set<T>(_ value: T, for key: String, encoder: JSONEncoder) throws where T: Encodable
func delete(_ key: String) throws
}
public struct Keychain: KeychainProtocol {
public enum Error: Swift.Error {
case noData
case unexpectedData