diff --git a/SecureStorgageSample.xcodeproj/project.pbxproj b/SecureStorgageSample.xcodeproj/project.pbxproj
index 5b2422d..bc8f3fb 100644
--- a/SecureStorgageSample.xcodeproj/project.pbxproj
+++ b/SecureStorgageSample.xcodeproj/project.pbxproj
@@ -404,6 +404,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
+ DEVELOPMENT_TEAM = 6R7KLBPBLZ;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
@@ -436,6 +437,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
+ DEVELOPMENT_TEAM = 6R7KLBPBLZ;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
diff --git a/SecureStorgageSample.xcodeproj/xcuserdata/mattbruce.xcuserdatad/xcschemes/xcschememanagement.plist b/SecureStorgageSample.xcodeproj/xcuserdata/mattbruce.xcuserdatad/xcschemes/xcschememanagement.plist
index 72cdf61..c36b9b7 100644
--- a/SecureStorgageSample.xcodeproj/xcuserdata/mattbruce.xcuserdatad/xcschemes/xcschememanagement.plist
+++ b/SecureStorgageSample.xcodeproj/xcuserdata/mattbruce.xcuserdatad/xcschemes/xcschememanagement.plist
@@ -7,7 +7,7 @@
SecureStorgageSample.xcscheme_^#shared#^_
orderHint
- 1
+ 0
diff --git a/SecureStorgageSample/Views/EncryptedStorageDemo.swift b/SecureStorgageSample/Views/EncryptedStorageDemo.swift
index c546f26..8363721 100644
--- a/SecureStorgageSample/Views/EncryptedStorageDemo.swift
+++ b/SecureStorgageSample/Views/EncryptedStorageDemo.swift
@@ -14,6 +14,7 @@ struct EncryptedStorageDemo: View {
@State private var statusMessage = ""
@State private var isLoading = false
@State private var iterations = 10_000
+ @FocusState private var isFieldFocused: Bool
var body: some View {
Form {
@@ -26,6 +27,7 @@ struct EncryptedStorageDemo: View {
Section("Add Log Entry") {
TextField("Enter log message", text: $logEntry, axis: .vertical)
.lineLimit(3, reservesSpace: true)
+ .focused($isFieldFocused)
Stepper("PBKDF2 Iterations: \(iterations)", value: $iterations, in: 1000...100000, step: 1000)
.font(.caption)
@@ -99,6 +101,14 @@ struct EncryptedStorageDemo: View {
}
.navigationTitle("Encrypted Storage")
.navigationBarTitleDisplayMode(.inline)
+ .toolbar {
+ ToolbarItemGroup(placement: .keyboard) {
+ Spacer()
+ Button("Done") {
+ isFieldFocused = false
+ }
+ }
+ }
}
private func addLogEntry() {
diff --git a/SecureStorgageSample/Views/FileSystemDemo.swift b/SecureStorgageSample/Views/FileSystemDemo.swift
index 4428900..becd4f4 100644
--- a/SecureStorgageSample/Views/FileSystemDemo.swift
+++ b/SecureStorgageSample/Views/FileSystemDemo.swift
@@ -16,6 +16,7 @@ struct FileSystemDemo: View {
@State private var statusMessage = ""
@State private var isLoading = false
@State private var selectedDirectory: FileDirectory = .documents
+ @FocusState private var isFieldFocused: Bool
var body: some View {
Form {
@@ -27,11 +28,14 @@ struct FileSystemDemo: View {
Section("Profile Data") {
TextField("Name", text: $profileName)
+ .focused($isFieldFocused)
TextField("Email", text: $profileEmail)
.keyboardType(.emailAddress)
.textContentType(.emailAddress)
+ .focused($isFieldFocused)
TextField("Age", text: $profileAge)
.keyboardType(.numberPad)
+ .focused($isFieldFocused)
}
Section("Storage Location") {
@@ -100,6 +104,14 @@ struct FileSystemDemo: View {
}
.navigationTitle("File System")
.navigationBarTitleDisplayMode(.inline)
+ .toolbar {
+ ToolbarItemGroup(placement: .keyboard) {
+ Spacer()
+ Button("Done") {
+ isFieldFocused = false
+ }
+ }
+ }
}
private func saveProfile() {
diff --git a/SecureStorgageSample/Views/KeychainDemo.swift b/SecureStorgageSample/Views/KeychainDemo.swift
index 87f3d87..d77f72b 100644
--- a/SecureStorgageSample/Views/KeychainDemo.swift
+++ b/SecureStorgageSample/Views/KeychainDemo.swift
@@ -16,6 +16,7 @@ struct KeychainDemo: View {
@State private var isLoading = false
@State private var selectedAccessibility: KeychainAccessibility = .afterFirstUnlock
@State private var selectedAccessControl: KeychainAccessControl? = nil
+ @FocusState private var focusedField: Bool
var body: some View {
Form {
@@ -27,7 +28,9 @@ struct KeychainDemo: View {
Section("Credentials") {
TextField("Username", text: $username)
+ .focused($focusedField)
SecureField("Password", text: $password)
+ .focused($focusedField)
}
Section("Accessibility") {
@@ -100,6 +103,14 @@ struct KeychainDemo: View {
}
.navigationTitle("Keychain")
.navigationBarTitleDisplayMode(.inline)
+ .toolbar {
+ ToolbarItemGroup(placement: .keyboard) {
+ Spacer()
+ Button("Done") {
+ focusedField = false
+ }
+ }
+ }
}
private func saveCredentials() {
diff --git a/SecureStorgageSample/Views/PlatformSyncDemo.swift b/SecureStorgageSample/Views/PlatformSyncDemo.swift
index fb961e1..d7f4b2c 100644
--- a/SecureStorgageSample/Views/PlatformSyncDemo.swift
+++ b/SecureStorgageSample/Views/PlatformSyncDemo.swift
@@ -15,6 +15,7 @@ struct PlatformSyncDemo: View {
@State private var isLoading = false
@State private var selectedPlatform: PlatformAvailability = .all
@State private var selectedSync: SyncPolicy = .never
+ @FocusState private var isFieldFocused: Bool
var body: some View {
Form {
@@ -49,6 +50,7 @@ struct PlatformSyncDemo: View {
Section("Test Data") {
TextField("Enter a value to store", text: $settingValue)
+ .focused($isFieldFocused)
}
Section("Actions") {
@@ -102,6 +104,14 @@ struct PlatformSyncDemo: View {
}
.navigationTitle("Platform & Sync")
.navigationBarTitleDisplayMode(.inline)
+ .toolbar {
+ ToolbarItemGroup(placement: .keyboard) {
+ Spacer()
+ Button("Done") {
+ isFieldFocused = false
+ }
+ }
+ }
}
@ViewBuilder
diff --git a/SecureStorgageSample/Views/UserDefaultsDemo.swift b/SecureStorgageSample/Views/UserDefaultsDemo.swift
index d20d92f..d96c6a9 100644
--- a/SecureStorgageSample/Views/UserDefaultsDemo.swift
+++ b/SecureStorgageSample/Views/UserDefaultsDemo.swift
@@ -13,6 +13,7 @@ struct UserDefaultsDemo: View {
@State private var storedValue = ""
@State private var statusMessage = ""
@State private var isLoading = false
+ @FocusState private var isInputFocused: Bool
var body: some View {
Form {
@@ -25,6 +26,7 @@ struct UserDefaultsDemo: View {
Section("Store Value") {
TextField("Enter a value", text: $inputText)
.textFieldStyle(.roundedBorder)
+ .focused($isInputFocused)
Button(action: saveValue) {
HStack {
@@ -83,6 +85,14 @@ struct UserDefaultsDemo: View {
}
.navigationTitle("UserDefaults")
.navigationBarTitleDisplayMode(.inline)
+ .toolbar {
+ ToolbarItemGroup(placement: .keyboard) {
+ Spacer()
+ Button("Done") {
+ isInputFocused = false
+ }
+ }
+ }
}
private func saveValue() {