Skip to content

Commit

Permalink
Add Sendable conformance (#235)
Browse files Browse the repository at this point in the history
  • Loading branch information
Widcket authored Jan 31, 2025
1 parent ad92cae commit cc9209d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion SimpleKeychain/Accessibility.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Security

/// Represents the accessibility types of Keychain items. It's a mirror of `kSecAttrAccessible` values.
public enum Accessibility: RawRepresentable {
public enum Accessibility: RawRepresentable, @unchecked Sendable {

/// The data in the Keychain item can be accessed only while the device is unlocked by the user.
/// See [kSecAttrAccessibleWhenUnlocked](https://developer.apple.com/documentation/security/ksecattraccessiblewhenunlocked).
Expand Down
4 changes: 2 additions & 2 deletions SimpleKeychain/SimpleKeychain.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation
import Security
#if canImport(LocalAuthentication)
import LocalAuthentication
@preconcurrency import LocalAuthentication
#endif

typealias RetrieveFunction = (_ query: CFDictionary, _ result: UnsafeMutablePointer<CFTypeRef?>?) -> OSStatus
Expand All @@ -10,7 +10,7 @@ typealias RemoveFunction = (_ query: CFDictionary) -> OSStatus
/// A simple Keychain wrapper for iOS, macOS, tvOS, and watchOS.
/// Supports sharing credentials with an **access group** or through **iCloud**, and integrating
/// **Touch ID / Face ID**.
public struct SimpleKeychain {
public struct SimpleKeychain: @unchecked Sendable {
let service: String
let accessGroup: String?
let accessibility: Accessibility
Expand Down

0 comments on commit cc9209d

Please sign in to comment.