Skip to content

fix: remove APIVersionResolver - WPB-22732#4132

Open
netbe wants to merge 15 commits intodevelopfrom
fix/WPB-22732-remove-apiversionresolver
Open

fix: remove APIVersionResolver - WPB-22732#4132
netbe wants to merge 15 commits intodevelopfrom
fix/WPB-22732-remove-apiversionresolver

Conversation

@netbe
Copy link
Collaborator

@netbe netbe commented Jan 16, 2026

TaskWPB-22732 [iOS] Remove APIVersionResolver dead code

Issue

Following removing dead code from non multibackend code, this PR removes the APIVersionResolver

Testing

N/A


Checklist

  • Title contains a reference JIRA issue number like [WPB-XXX].
  • Description is filled and free of optional paragraphs.
  • Adds/updates automated tests.

UI accessibility checklist

If your PR includes UI changes, please utilize this checklist:

  • Make sure you use the API for UI elements that support large fonts.
  • All colors are taken from WireDesign.ColorTheme or constructed using WireDesign.BaseColorPalette.
  • New UI elements have Accessibility strings for VoiceOver.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 16, 2026

Test Results

    4 files    511 suites   3m 52s ⏱️
3 717 tests 3 690 ✅ 27 💤 0 ❌
3 728 runs  3 701 ✅ 27 💤 0 ❌

Results for commit b893cc3.

♻️ This comment has been updated with latest results.

Summary: workflow run #21664714455
Allure report (download zip): html-report-27527-fix_WPB-22732-remove-apiversionresolver

@netbe netbe changed the title fix: remove APIVersionResolver - WPB-22732 fix: remove APIVersionResolver - WPB-22732 Jan 19, 2026
private func configureTransportSession() {
transportSession.setNetworkStateDelegate(self)
transportSession.setAccessTokenRenewalFailureHandler { [weak self] response in
self?.transportSessionAccessTokenDidFail(response: response)
Copy link
Collaborator

Choose a reason for hiding this comment

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

question: are you sure we can delete this? It seems like it's necessary to trigger logout.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

not completely sure 😅, i thought it was only for renewing token after api v2

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

reverted

Copy link
Contributor

@samwyndham samwyndham left a comment

Choose a reason for hiding this comment

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

Nice work!

if let apiVersion {
self = .apiVersion(apiVersion)
init(apiVersion: WireNetwork.APIVersion?) {
if let apiVersion, let version = WireTransport.APIVersion(rawValue: Int32(apiVersion.rawValue)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

thought (maybe out of scope): I guess we should always be able to map a WireNetwork.APIVersion to WireTransport.APIVersion right? if nil is returned here it doesn't really mean no preference but is some programmer error. I think it is worth adding mappers somewhere that convert between the two APIVersion types.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah for me the fix is to remove duplication, it should be doable either in making WireNetwork a dependency of WireTransport or moving APIVersion definition to WireFoundation.
I guess the latter is more appropriate

@netbe netbe requested a review from johnxnguyen February 4, 2026 08:48
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