Skip to content

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 47s ⏱️
3 717 tests 3 688 ✅ 27 💤 2 ❌
3 728 runs  3 701 ✅ 27 💤 0 ❌

For more details on these failures, see this check.

Results for commit ce035b5.

♻️ This comment has been updated with latest results.

@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

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.

4 participants