Skip to content

Rewrite parts of WPAccount in Swift#25272

Merged
kean merged 1 commit intotrunkfrom
task/remove-keychain-dependency-from-wpaccount
Feb 23, 2026
Merged

Rewrite parts of WPAccount in Swift#25272
kean merged 1 commit intotrunkfrom
task/remove-keychain-dependency-from-wpaccount

Conversation

@kean
Copy link
Copy Markdown
Contributor

@kean kean commented Feb 19, 2026

This is a first part of the rework of WPAccount auth token management to Swift. It is more of a mechanical change that doesn't introduce any refactoring.

@kean kean added this to the Someday milestone Feb 19, 2026
@kean kean added the General label Feb 19, 2026
@wpmobilebot
Copy link
Copy Markdown
Contributor

wpmobilebot commented Feb 19, 2026

App Icon📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack
ConfigurationRelease-Alpha
Build Number31039
VersionPR #25272
Bundle IDcom.jetpack.alpha
Commit694efac
Installation URL3plsdnte7o2tg
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot
Copy link
Copy Markdown
Contributor

wpmobilebot commented Feb 19, 2026

App Icon📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress
ConfigurationRelease-Alpha
Build Number31039
VersionPR #25272
Bundle IDorg.wordpress.alpha
Commit694efac
Installation URL2vke1umln5aa0
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot
Copy link
Copy Markdown
Contributor

wpmobilebot commented Feb 19, 2026

🤖 Build Failure Analysis

This build has failures. Claude has analyzed them - check the build annotations for details.

@kean kean force-pushed the task/remove-keychain-dependency-from-wpaccount branch from 1a46d04 to 2502056 Compare February 19, 2026 19:55
/// It's reserved for Objective-C to Swift interoperability in the context of separating this model from the app target and will be removed at some point.
@property (nonatomic, strong, nullable) WordPressComRestApi *_private_wordPressComRestApi;

@property (nonatomic, copy, nullable) NSString *cachedToken;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I plan to remove it in the future PR, so it won't be in the public API.

It seems incorrect to cache token on the per-instance basic. The the app cleans the token (account.authToken = nil), in invalidates cachedToken only on this instance. The other instances might continue to return the same invalidated cached token.

In the future PRs, I plan to introduce a shared keychain service that would contain an in-memory dictionary for cached token. It will also allow us to uncomment some of the tests.

Base automatically changed from task/update-blog-tests-to-swift-testing to trunk February 20, 2026 01:17
@kean kean force-pushed the task/remove-keychain-dependency-from-wpaccount branch from 2502056 to 5cf03b0 Compare February 20, 2026 01:18
@kean kean force-pushed the task/remove-keychain-dependency-from-wpaccount branch from 5cf03b0 to 694efac Compare February 20, 2026 20:13
@sonarqubecloud
Copy link
Copy Markdown

@kean kean added this pull request to the merge queue Feb 23, 2026
Merged via the queue into trunk with commit 42ea8f6 Feb 23, 2026
27 of 32 checks passed
@kean kean deleted the task/remove-keychain-dependency-from-wpaccount branch February 23, 2026 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants