Skip to content

Commit f0aeacd

Browse files
committed
organize a bit
1 parent 4a8a047 commit f0aeacd

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

swift-sdk/Internal/IterableKeychain.swift

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
import Foundation
66

77
class IterableKeychain {
8+
init(wrapper: KeychainWrapper = KeychainWrapper()) {
9+
self.wrapper = wrapper
10+
}
11+
812
var email: String? {
913
get {
1014
let data = wrapper.data(forKey: Const.Keychain.Key.email)
@@ -72,6 +76,8 @@ class IterableKeychain {
7276
}
7377

7478
func setLastPushPayload(_ payload: [AnyHashable: Any]?, withExpiration expiration: Date?) {
79+
// save expiration here
80+
7581
guard let value = payload?.jsonValue, JSONSerialization.isValidJSONObject(value) else {
7682
wrapper.removeValue(forKey: Const.Keychain.Key.lastPushPayload)
7783
return
@@ -85,9 +91,7 @@ class IterableKeychain {
8591
}
8692
}
8793

88-
init(wrapper: KeychainWrapper = KeychainWrapper()) {
89-
self.wrapper = wrapper
90-
}
94+
// MARK: - PRIVATE/INTERNAL
9195

9296
private let wrapper: KeychainWrapper
9397
}

swift-sdk/Internal/KeychainWrapper.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ class KeychainWrapper {
8989
return keychainQueryDictionary
9090
}
9191

92+
// MARK: - PRIVATE/INTERNAL
93+
9294
private func update(_ value: Data, forKey key: String) -> Bool {
9395
let keychainQueryDictionary: [String: Any] = setupKeychainQueryDictionary(forKey: key)
9496
let updateDictionary = [SecValueData: value]

0 commit comments

Comments
 (0)