Skip to content

Conversation

cbaker6
Copy link
Contributor

@cbaker6 cbaker6 commented Sep 2, 2022

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 the usingDataProtectionKeychain option when configuring the SDK. Developers can decide to set usingDataProtectionKeychain == true which will cause all macOS queries to use kSecUseDataProtectionKeychain == true and make the macOS Keychain behave like the iOS Keychain.

TODOs before merging

  • Add tests
  • Add entry to changelog
  • Add changes to documentation (guides, repository pages, in-code descriptions)

@parse-github-assistant
Copy link

parse-github-assistant bot commented Sep 2, 2022

Thanks for opening this pull request!

  • 🎉 We are excited about your hands-on contribution!

@codecov
Copy link

codecov bot commented Sep 2, 2022

Codecov Report

Merging #398 (2e756b4) into main (ed74494) will decrease coverage by 0.04%.
The diff coverage is 83.33%.

@@            Coverage Diff             @@
##             main     #398      +/-   ##
==========================================
- Coverage   89.68%   89.63%   -0.05%     
==========================================
  Files         158      158              
  Lines       15075    15080       +5     
==========================================
- Hits        13520    13517       -3     
- Misses       1555     1563       +8     
Impacted Files Coverage Δ
Sources/ParseSwift/Types/ParseConfiguration.swift 53.19% <50.00%> (-0.15%) ⬇️
Sources/ParseSwift/Parse.swift 99.01% <100.00%> (-0.99%) ⬇️
Sources/ParseSwift/Storage/KeychainStore.swift 97.86% <100.00%> (ø)
...eSwift/InternalObjects/BaseParseInstallation.swift 45.45% <0.00%> (-54.55%) ⬇️
Sources/ParseSwift/Objects/ParseObject.swift 87.29% <0.00%> (-0.15%) ⬇️
Sources/ParseSwift/Objects/ParseUser.swift 86.34% <0.00%> (+0.16%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@cbaker6 cbaker6 merged commit df71568 into parse-community:main Sep 2, 2022
@cbaker6 cbaker6 deleted the macOSKeychain branch September 2, 2022 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant