Skip to content

Commit f50f029

Browse files
cyberpapiiiclaude
andcommitted
fix: mark CNContactStore as nonisolated for Swift 6 concurrency
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 4f39d02 commit f50f029

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

swift/Sources/iMessageMax/Contacts/ContactResolver.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ import Foundation
55
actor ContactResolver {
66
private var cache: [String: String] = [:] // handle -> name
77
private var isInitialized = false
8-
private let store = CNContactStore()
8+
// CNContactStore is not Sendable, so we mark it nonisolated(unsafe)
9+
// This is safe because we only use it from within actor-isolated methods
10+
nonisolated(unsafe) private let store = CNContactStore()
911

1012
// MARK: - Authorization
1113

0 commit comments

Comments
 (0)