Open
Conversation
# Conflicts: # Example/Pods/Target Support Files/Locker/Locker-Info.plist # Example/Pods/Target Support Files/Locker/ResourceBundle-Locker_Locker-Locker-Info.plist
- Add @preconcurrency import for Foundation to suppress Sendable warnings - Mark completion handlers as @sendable for thread-safe callbacks - Add nonisolated(unsafe) to global mutable state (enableDeviceListSync, currentUserDefaults) - Make DeviceManager final and Sendable - Convert Keychain query dictionaries from [CFString: Any] to [String: Any] - Move dictionary creation inside async blocks to avoid capturing non-Sendable types The project now builds with zero concurrency warnings using -strict-concurrency=complete. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
# Conflicts: # Sources/Locker/Core/Locker.swift
- Add NSLock-based synchronization to Locker's global mutable state: - userDefaults/currentUserDefaults now uses lock-protected getter/setter - enableDeviceListSync converted from didSet to lock-protected computed property - Make BundleHelpers final and Sendable with file operation locking - Make LockerHelpers final and Sendable This ensures proper thread safety at runtime while maintaining Swift 6 strict concurrency compatibility. The nonisolated(unsafe) markers on backing storage indicate these variables are only accessed through lock-protected computed properties. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Phase 3 - Async/Await API: - Add async setSecret(_:for:) for storing secrets - Add async retrieveCurrentSecret(for:operationPrompt:) that throws RetrievalError - Add async deleteSecret(for:) and reset(for:) methods - Add RetrievalError enum (notFound, keychainError, invalidData) - All async methods require iOS 13.0+ Phase 4 - MainActor Callbacks: - Add setSecret(_:for:onMainActor:) with @mainactor completion - Add retrieveCurrentSecret(for:operationPrompt:onMainActorSuccess:onMainActorFailure:) - Callbacks are marked as @mainactor @sendable for full Swift 6 compliance All 25 tests pass (14 TouchIDTests + 11 LockerHelpersTests). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove @mainactor isolation from DeviceManager.shared and LockerHelpers.deviceManager since the DeviceManager class is Sendable and its methods don't require main actor isolation.
- Unify all UserDefaults access through Locker.userDefaults, fixing divergence when a custom suite is configured (keychain service name and LA policy domain state previously read/wrote UserDefaults.standard directly). Includes one-time migration from .standard on first access. - Replace nonisolated(unsafe) + NSLock in Locker with LockerState, a Sendable container that encapsulates all shared mutable state. - Extract Keychain operations into KeychainHelper with async entry points; legacy callback APIs delegate via Task.detached, async APIs call KeychainHelper directly (no double-wrapping via continuations). - Convert DeviceManager.fetchDevices() to async URLSession.data(from:). - Align Package.swift with podspec: swift-tools-version 5.9, iOS 13, .swiftLanguageMode(.v6). - Add 8 new tests covering custom-suite unification, migration, async store/retrieve/delete/reset, and legacy callback compatibility. - Update README with async/await usage and custom UserDefaults docs.
Local Claude Code configuration (permission settings) is user-specific and should not be tracked in version control.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.