Skip to content

Revert #5013 (tabFocusesLinks breaks Mac Catalyst build)#5035

Merged
bgoncal merged 1 commit into
mainfrom
fix/revert-catalyst-tabfocuseslinks
Jul 10, 2026
Merged

Revert #5013 (tabFocusesLinks breaks Mac Catalyst build)#5035
bgoncal merged 1 commit into
mainfrom
fix/revert-catalyst-tabfocuseslinks

Conversation

@bgoncal

@bgoncal bgoncal commented Jul 10, 2026

Copy link
Copy Markdown
Member

Summary

Reverts #5013 (Fix Tab key not moving between web view form fields on Mac Catalyst), which broke the Mac Catalyst archive in the Distribute workflow (failing run):

WebViewController.swift:209: error: value of type 'WKPreferences' has no member 'tabFocusesLinks'
OnboardingAuthLoginViewController.swift:26: error: value of type 'WKPreferences' has no member 'tabFocusesLinks'
** ARCHIVE FAILED **

Root cause

#5013 set WKPreferences.tabFocusesLinks = true inside a #if targetEnvironment(macCatalyst) block. But that property is macOS/AppKit-only — WebKit's WKPreferences.h declares it under #if !TARGET_OS_IPHONE:

#if !TARGET_OS_IPHONE
@property (nonatomic) BOOL tabFocusesLinks API_AVAILABLE(macos(10.12.4));
#endif

Mac Catalyst is an iOS-derived environment (TARGET_OS_IPHONE == 1), so the symbol is stripped from the Catalyst SDK. The #if targetEnvironment(macCatalyst) guard wrapped the call in exactly the one environment where it can't compile.

Why it wasn't caught earlier

The PR pipeline (ci.yml) only builds the iOS simulator and runs tests; it never compiles Mac Catalyst. The Catalyst archive is compiled only by the Distribute workflow on push to main, so main's mac build has been broken since #5013 merged (2026-07-09).

Reverting to unblock Mac distribution. The original Tab-focus improvement can be revisited with an approach that actually compiles on Catalyst (e.g. a KVC/dynamic set), validated against a real Mac build.

🤖 Generated with Claude Code

…talyst (#5013)"

This reverts commit 265594c.

#5013 set WKPreferences.tabFocusesLinks inside a #if targetEnvironment(macCatalyst)
block, but that property is macOS/AppKit-only: WebKit's WKPreferences.h gates it
with #if !TARGET_OS_IPHONE, and Mac Catalyst has TARGET_OS_IPHONE == 1, so the
symbol is absent from the Catalyst SDK. The guard therefore wrapped the call in
the one environment where it does not compile, breaking the Mac Catalyst archive
in the Distribute workflow:

  error: value of type 'WKPreferences' has no member 'tabFocusesLinks'
  ** ARCHIVE FAILED **

PR CI only builds the iOS simulator and never compiles Catalyst, so this slipped
through and broke main. Reverting to unblock the Mac distribution build.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 10, 2026 10:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Reverts the Mac Catalyst Tab-focus change introduced in #5013 by removing usage of WKPreferences.tabFocusesLinks, which is unavailable in the Mac Catalyst SDK and caused the Distribute (archive) workflow to fail.

Changes:

  • Remove configuration.preferences.tabFocusesLinks = true from the onboarding login web view configuration.
  • Remove config.preferences.tabFocusesLinks = true from the main frontend web view configuration.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
Sources/App/Onboarding/API/OnboardingAuthLoginViewController.swift Removes the Catalyst-only tabFocusesLinks preference that fails to compile when archiving for Mac Catalyst.
Sources/App/Frontend/WebView/WebViewController.swift Removes the same tabFocusesLinks preference from the primary web view configuration to restore Catalyst archive compatibility.

@bgoncal bgoncal enabled auto-merge (squash) July 10, 2026 10:57
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Unused L10n strings detected

Found 3 unused localization strings in the codebase.

Click to see details
Parsing Strings.swift...
Found 1907 L10n strings

Reading all Swift source code...
Read 6428733 characters of Swift code

Checking for unused strings...
Checked 100/1907 strings...
Checked 200/1907 strings...
Checked 300/1907 strings...
Checked 400/1907 strings...
Checked 500/1907 strings...
Checked 600/1907 strings...
Checked 700/1907 strings...
Checked 800/1907 strings...
Checked 900/1907 strings...
Checked 1000/1907 strings...
Checked 1100/1907 strings...
Checked 1200/1907 strings...
Checked 1300/1907 strings...
Checked 1400/1907 strings...
Checked 1500/1907 strings...
Checked 1600/1907 strings...
Checked 1700/1907 strings...
Checked 1800/1907 strings...
Checked 1900/1907 strings...

================================================================================
UNUSED STRINGS REPORT
================================================================================

Found 3 unused strings:


CAMERAPLAYER:
  - L10n.CameraPlayer.Talkback.microphoneDenied
    Key: camera_player.talkback.microphone_denied
    Line: 820

CONNECTION:
  - L10n.Connection.Permission.InternalUrl.body1
    Key: connection.permission.internal_url.body1
    Line: 1370
  - L10n.Connection.Permission.InternalUrl.body2
    Key: connection.permission.internal_url.body2
    Line: 1372

================================================================================
Total unused: 3
================================================================================

================================================================================
Copy-paste these keys into the "Lokalise: Delete Keys" workflow (keys input):
================================================================================
camera_player.talkback.microphone_denied,connection.permission.internal_url.body1,connection.permission.internal_url.body2

To remove them, run the
Lokalise: Delete Keys
workflow — it deletes the keys from Lokalise and opens a PR removing them from
Localizable.strings and regenerating Strings.swift. Copy-paste these keys into the keys input:

camera_player.talkback.microphone_denied,connection.permission.internal_url.body1,connection.permission.internal_url.body2

@bgoncal bgoncal merged commit 2258038 into main Jul 10, 2026
12 checks passed
@bgoncal bgoncal deleted the fix/revert-catalyst-tabfocuseslinks branch July 10, 2026 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants