From 86c2f9e7402e2dadf0e9b2d922d24ba0a25bf139 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Wed, 14 Jan 2026 11:54:49 -0600 Subject: [PATCH] Signed-off-by: Matt Bruce --- README.md | 2 +- .../StorageKeys/AppGroup/UserPreferencesKey.swift | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 4fd5050..5628e55 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ The app demonstrates various storage configurations: ### UserDefaults - Simple string storage with automatic sync -- Custom suite support +- App Group UserDefaults support for shared preferences ### Keychain - 7 accessibility options (whenUnlocked, afterFirstUnlock, etc.) diff --git a/SecureStorgageSample/StorageKeys/AppGroup/UserPreferencesKey.swift b/SecureStorgageSample/StorageKeys/AppGroup/UserPreferencesKey.swift index 35c33c5..ec216bd 100644 --- a/SecureStorgageSample/StorageKeys/AppGroup/UserPreferencesKey.swift +++ b/SecureStorgageSample/StorageKeys/AppGroup/UserPreferencesKey.swift @@ -2,19 +2,19 @@ import Foundation import LocalData extension StorageKeys { - /// Stores user preferences in a custom suite. - /// - Domain: UserDefaults (custom suite) + /// Stores user preferences in App Group UserDefaults. + /// - Domain: App Group UserDefaults /// - Security: None /// - Sync: Never struct UserPreferencesKey: StorageKey { typealias Value = [String: AnyCodable] let name = "user_preferences" - let domain: StorageDomain = .userDefaults(suite: "group.com.example.securestorage") + let domain: StorageDomain = .appGroupUserDefaults(identifier: AppGroupConfiguration.identifier) let security: SecurityPolicy = .none let serializer: Serializer<[String: AnyCodable]> = .json let owner = "SampleApp" - let description = "Stores user preferences for app configuration screens." + let description = "Stores shared user preferences for app configuration screens." let availability: PlatformAvailability = .all let syncPolicy: SyncPolicy = .never }