Signed-off-by: Matt Bruce <mbrucedogs@gmail.com>
This commit is contained in:
parent
a8f49c1cf1
commit
3019e19d5b
@ -23,6 +23,8 @@ extension StorageKey where Value == UserProfile {
|
|||||||
)
|
)
|
||||||
|
|
||||||
/// Creates a version of the key for a different App Group directory.
|
/// Creates a version of the key for a different App Group directory.
|
||||||
|
/// Sample-only: production apps should avoid dynamic App Group configuration and
|
||||||
|
/// migrate when storage settings change.
|
||||||
nonisolated static func appGroupUserProfileKey(
|
nonisolated static func appGroupUserProfileKey(
|
||||||
directory: FileDirectory = .documents
|
directory: FileDirectory = .documents
|
||||||
) -> StorageKey {
|
) -> StorageKey {
|
||||||
|
|||||||
@ -17,6 +17,8 @@ extension StorageKey where Value == [String] {
|
|||||||
)
|
)
|
||||||
|
|
||||||
/// Builds a variant with a custom PBKDF2 iteration count for demo purposes.
|
/// Builds a variant with a custom PBKDF2 iteration count for demo purposes.
|
||||||
|
/// Sample-only: production apps should treat encryption parameters as fixed and
|
||||||
|
/// perform a migration if they must change.
|
||||||
nonisolated static func sessionLogsKey(iterations: Int) -> StorageKey {
|
nonisolated static func sessionLogsKey(iterations: Int) -> StorageKey {
|
||||||
StorageKey(
|
StorageKey(
|
||||||
name: "session_logs.json",
|
name: "session_logs.json",
|
||||||
|
|||||||
@ -17,6 +17,8 @@ extension StorageKey where Value == UserProfile {
|
|||||||
)
|
)
|
||||||
|
|
||||||
/// Builds a profile key for an alternate file directory.
|
/// Builds a profile key for an alternate file directory.
|
||||||
|
/// Sample-only: production apps should keep directory decisions static; if the
|
||||||
|
/// storage domain changes, migrate instead of toggling the key at runtime.
|
||||||
nonisolated static func userProfileFileKey(directory: FileDirectory = .documents) -> StorageKey {
|
nonisolated static func userProfileFileKey(directory: FileDirectory = .documents) -> StorageKey {
|
||||||
StorageKey(
|
StorageKey(
|
||||||
name: UserProfile.storageKeyName,
|
name: UserProfile.storageKeyName,
|
||||||
|
|||||||
@ -18,6 +18,8 @@ extension StorageKey where Value == Credential {
|
|||||||
)
|
)
|
||||||
|
|
||||||
/// Builds a key with custom Keychain accessibility or access control options.
|
/// Builds a key with custom Keychain accessibility or access control options.
|
||||||
|
/// Sample-only: production apps should not allow dynamic key configuration; treat
|
||||||
|
/// StorageKey settings as fixed and migrate if security policies change.
|
||||||
nonisolated static func credentialsKey(
|
nonisolated static func credentialsKey(
|
||||||
accessibility: KeychainAccessibility = .afterFirstUnlock,
|
accessibility: KeychainAccessibility = .afterFirstUnlock,
|
||||||
accessControl: KeychainAccessControl? = nil
|
accessControl: KeychainAccessControl? = nil
|
||||||
|
|||||||
@ -17,6 +17,8 @@ extension StorageKey where Value == String {
|
|||||||
)
|
)
|
||||||
|
|
||||||
/// Builds a variant to demonstrate different availability and sync policies.
|
/// Builds a variant to demonstrate different availability and sync policies.
|
||||||
|
/// Sample-only: production apps should keep availability and sync policies static;
|
||||||
|
/// if these change, migrate the data rather than altering the key at runtime.
|
||||||
nonisolated static func syncableSettingKey(
|
nonisolated static func syncableSettingKey(
|
||||||
availability: PlatformAvailability = .all,
|
availability: PlatformAvailability = .all,
|
||||||
syncPolicy: SyncPolicy = .never
|
syncPolicy: SyncPolicy = .never
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user