Repository navigation
Delete the deprecated KeychainUtils class - #26472
Conversation
Generated by 🚫 Danger |
wpmobilebot
left a comment
There was a problem hiding this comment.
Approve. This deletes the deprecated KeychainUtils class and its only test. Nothing in the repo still uses it. I searched Swift, Objective-C, headers, .pbxproj, test plans, and YAML/JSON files, and found no references to KeychainUtils or copyKeychain. The history matches the description: #25654 moved the production callers to AppKeychain/SharedKeychain, and #25306 removed the last copyKeychain call. WordPressShared still needs SFHFKeychainUtils because AppKeychain and SharedKeychain import it. The deleted test only covered copyKeychain, which is also gone, so no remaining code loses coverage.
Validation on 1a9aab3b59, iPhone 18 Pro simulator, iOS 27.2 (Xcode 27.2):
WordPressUnitTestsplan, filtered toWordPressSharedTestsplusWordPressTest/DataMigratorTests,SharedDataIssueSolverTests, andKeychainTest. Result:Test run with 224 tests in 50 suites passedandExecuted 21 tests, with 0 failures.- The Jetpack Debug build succeeded. I signed in with the test account using
-wpcom-token, terminated the app, and relaunched it without arguments. It opened on My Site, still signed in.
Gaps: I had no a8c-secrets key, so I built with a local-only change that lets the Decrypt Secrets phase continue when decryption fails. That phase isn't related to this change. I didn't test a fresh-install keychain migration, because this PR doesn't change any migration code. CI's build and unit-test jobs were still pending when I submitted this review.
Optional follow-ups, both in files this PR doesn't touch:
- Nit:
+[SFHFKeychainUtils getAllPasswordsForAccessGroup:](Modules/Sources/SFHFKeychainUtils/include/SFHFKeychainUtils.h:68) has no callers oncecopyKeychainis gone, so it can be deleted. - Nit:
KeychainUtilsMock(Tests/KeystoneTests/Tests/Jetpack/KeychainUtilsMock.swift) is still named after the class this PR deletes. It mocksKeychainAccessible, so a name likeKeychainAccessibleMockwould point readers to a type that exists.
Description
AppKeychainandSharedKeychainreplaced the production callers in #25654. The lastcopyKeychaincaller was removed in #25306. Repository-wide searches found no remaining callers of the deprecated class, including Objective-C callers.Remove the unused class and its dedicated test. Keychain storage and migration behavior are unchanged. No release note is needed because there is no user-visible change.
What I ran
Codex verified on an iPhone 18 Pro simulator running iOS 27.2:
WordPress and Jetpack builds passed with ad hoc signing.
The full
WordPressSharedTeststarget passed throughWordPressUnitTests, includingAppKeychainTestsandSharedKeychainTests:Jetpack signed in with the test account and stayed signed in after termination and relaunch without credentials.
Testing instructions
Run
WordPressSharedTeststhrough theWordPressUnitTestsplan. Sign in to Jetpack, terminate it, and relaunch without sign-in arguments. Confirm the account stays signed in.