From 89af2d7ba8e729d1e09954a06c6aa82db2fa6b3b Mon Sep 17 00:00:00 2001 From: Leif Date: Thu, 10 Oct 2024 17:00:52 -0600 Subject: [PATCH 1/2] Add new lines --- .../Application/Types/State/Application+SyncState.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sources/AppState/Application/Types/State/Application+SyncState.swift b/Sources/AppState/Application/Types/State/Application+SyncState.swift index a0f28fe..7c5d44c 100644 --- a/Sources/AppState/Application/Types/State/Application+SyncState.swift +++ b/Sources/AppState/Application/Types/State/Application+SyncState.swift @@ -9,9 +9,11 @@ extension Application { public func data(forKey key: String) -> Data? { NSUbiquitousKeyValueStore.default.data(forKey: key) } + public func set(_ value: Data?, forKey key: String) { NSUbiquitousKeyValueStore.default.set(value, forKey: key) } + public func removeObject(forKey key: String) { NSUbiquitousKeyValueStore.default.removeObject(forKey: key) } From 9436f64706a68b414a1ee9f25d70c8492002f577 Mon Sep 17 00:00:00 2001 From: Leif Date: Thu, 10 Oct 2024 17:05:55 -0600 Subject: [PATCH 2/2] Remove newlines --- Sources/AppState/Application/Types/Helper/FileManaging.swift | 1 - .../Types/Helper/UbiquitousKeyValueStoreManaging.swift | 1 - .../AppState/Application/Types/Helper/UserDefaultsManaging.swift | 1 - 3 files changed, 3 deletions(-) diff --git a/Sources/AppState/Application/Types/Helper/FileManaging.swift b/Sources/AppState/Application/Types/Helper/FileManaging.swift index 90e6f6c..b8a02a7 100644 --- a/Sources/AppState/Application/Types/Helper/FileManaging.swift +++ b/Sources/AppState/Application/Types/Helper/FileManaging.swift @@ -1,6 +1,5 @@ /// A protocol that provides methods for reading, writing, and deleting files in a type-safe, sendable manner. public protocol FileManaging: Sendable { - /// Reads a file from the given path and decodes its contents into the specified type. /// - Parameters: /// - path: The directory path where the file is located. Defaults to the current directory `"."`. diff --git a/Sources/AppState/Application/Types/Helper/UbiquitousKeyValueStoreManaging.swift b/Sources/AppState/Application/Types/Helper/UbiquitousKeyValueStoreManaging.swift index 5133d29..2c848d2 100644 --- a/Sources/AppState/Application/Types/Helper/UbiquitousKeyValueStoreManaging.swift +++ b/Sources/AppState/Application/Types/Helper/UbiquitousKeyValueStoreManaging.swift @@ -4,7 +4,6 @@ import Foundation /// A protocol that provides a thread-safe interface for interacting with `NSUbiquitousKeyValueStore`, /// which synchronizes key-value data across the user's iCloud-enabled devices. public protocol UbiquitousKeyValueStoreManaging: Sendable { - /// Retrieves data stored in iCloud for the specified key. /// - Parameter key: The key used to retrieve the associated data from the `NSUbiquitousKeyValueStore`. /// - Returns: The `Data` object associated with the key, or `nil` if no data is found. diff --git a/Sources/AppState/Application/Types/Helper/UserDefaultsManaging.swift b/Sources/AppState/Application/Types/Helper/UserDefaultsManaging.swift index 731bdee..5148ed2 100644 --- a/Sources/AppState/Application/Types/Helper/UserDefaultsManaging.swift +++ b/Sources/AppState/Application/Types/Helper/UserDefaultsManaging.swift @@ -1,7 +1,6 @@ /// A protocol that provides a thread-safe interface for interacting with `UserDefaults`, /// allowing the storage, retrieval, and removal of user preferences and data. public protocol UserDefaultsManaging: Sendable { - /// Retrieves an object from `UserDefaults` for the given key. /// - Parameter key: The key used to retrieve the associated value from `UserDefaults`. /// - Returns: The value stored in `UserDefaults` for the given key, or `nil` if no value is associated with the key.