File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 5
5
import Foundation
6
6
7
7
class IterableKeychain {
8
+ init ( wrapper: KeychainWrapper = KeychainWrapper ( ) ) {
9
+ self . wrapper = wrapper
10
+ }
11
+
8
12
var email : String ? {
9
13
get {
10
14
let data = wrapper. data ( forKey: Const . Keychain. Key. email)
@@ -72,6 +76,8 @@ class IterableKeychain {
72
76
}
73
77
74
78
func setLastPushPayload( _ payload: [ AnyHashable : Any ] ? , withExpiration expiration: Date ? ) {
79
+ // save expiration here
80
+
75
81
guard let value = payload? . jsonValue, JSONSerialization . isValidJSONObject ( value) else {
76
82
wrapper. removeValue ( forKey: Const . Keychain. Key. lastPushPayload)
77
83
return
@@ -85,9 +91,7 @@ class IterableKeychain {
85
91
}
86
92
}
87
93
88
- init ( wrapper: KeychainWrapper = KeychainWrapper ( ) ) {
89
- self . wrapper = wrapper
90
- }
94
+ // MARK: - PRIVATE/INTERNAL
91
95
92
96
private let wrapper : KeychainWrapper
93
97
}
Original file line number Diff line number Diff line change @@ -89,6 +89,8 @@ class KeychainWrapper {
89
89
return keychainQueryDictionary
90
90
}
91
91
92
+ // MARK: - PRIVATE/INTERNAL
93
+
92
94
private func update( _ value: Data , forKey key: String ) -> Bool {
93
95
let keychainQueryDictionary : [ String : Any ] = setupKeychainQueryDictionary ( forKey: key)
94
96
let updateDictionary = [ SecValueData: value]
You can’t perform that action at this time.
0 commit comments