Skip to content

Conversation

tylerjroach
Copy link
Member

Issue #

#4076

Description

This change prevents shared Keychains (accessGroup) from being cleared on a fresh install. Since UserDefaults are not shared across apps/extensions, we have no reliable way to determine if this is the first launch of all apps/extensions that are using the provided accessGroup.

The caveat here is that if a user uninstalls and reinstalls an application, the credentials will not be wiped like they are in the standard, non shared Keychain usage. This change is necessary though given the above description.

General Checklist

  • Added new tests to cover change, if needed
  • Build succeeds with all target using Swift Package Manager
  • All unit tests pass
  • All integration tests pass
  • Security oriented best practices and standards are followed (e.g. using input sanitization, principle of least privilege, etc)
  • Documentation update for the change if required
  • PR title conforms to conventional commit style
  • New or updated tests include Given When Then inline code documentation and are named accordingly testThing_condition_expectation()
  • If breaking change, documentation/changelog update with migration instructions

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@tylerjroach tylerjroach requested a review from a team as a code owner October 17, 2025 14:36
Copy link

codecov bot commented Oct 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.17%. Comparing base (da37c22) to head (e87faf8).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4077      +/-   ##
==========================================
+ Coverage   68.03%   68.17%   +0.14%     
==========================================
  Files        1129     1129              
  Lines       54487    54493       +6     
==========================================
+ Hits        37068    37151      +83     
+ Misses      17419    17342      -77     
Flag Coverage Δ
API_plugin_unit_test 70.17% <ø> (+0.02%) ⬆️
AWSPluginsCore 69.50% <ø> (ø)
Amplify 47.88% <ø> (-0.02%) ⬇️
Analytics_plugin_unit_test 85.59% <ø> (ø)
Auth_plugin_unit_test 73.71% <100.00%> (+0.07%) ⬆️
DataStore_plugin_unit_test 84.44% <ø> (+0.69%) ⬆️
Geo_plugin_unit_test 75.95% <ø> (ø)
Logging_plugin_unit_test 65.56% <ø> (ø)
Predictions_plugin_unit_test 34.59% <ø> (ø)
PushNotifications_plugin_unit_test 88.76% <ø> (ø)
Storage_plugin_unit_test 78.90% <ø> (ø)
unit_tests 68.17% <100.00%> (+0.14%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tylerjroach tylerjroach merged commit 6af59d4 into main Oct 17, 2025
155 of 158 checks passed
@tylerjroach tylerjroach deleted the tjroach/fix-shared-keychain-clearing branch October 17, 2025 16:33
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.

3 participants