fix: default to setting use data protection to false for macOS Keychain #398
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.
New Pull Request Checklist
Issue Description
#378 Set all queries to the macOS Keychain to
kSecUseDataProtectionKeychain == true
by default. Though this is recommended by Apple to make the macOS and iOS Keychains behave the same way, it causes the issue of preventing saved items to the Keychain from being queried in Swift Playgrounds and other macOS environments (SPM XCTest) that do not have the ability to configure the Keychain.Related issue: #n/a
Approach
For macOS, default to not setting
kSecUseDataProtectionKeychain == true
and provide theusingDataProtectionKeychain
option when configuring the SDK. Developers can decide to setusingDataProtectionKeychain == true
which will cause all macOS queries to usekSecUseDataProtectionKeychain == true
and make the macOS Keychain behave like the iOS Keychain.TODOs before merging