Skip to content

Fix Mac Catalyst build - #2290

Open
T.J. Ross (thomasjross) wants to merge 1 commit into
microsoft:mainfrom
thomasjross:main
Open

T.J. Ross (thomasjross) wants to merge 1 commit into
microsoft:mainfrom
thomasjross:main

Conversation

@thomasjross

@thomasjross T.J. Ross (thomasjross) commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

Platforms Impacted

  • iOS / Mac Catalyst
  • visionOS
  • macOS

Description of changes

Fixes compilation of the FluentUI Swift package for Mac Catalyst.

Mac Catalyst compilation regressed after:

This change:

  • Excludes the AppKit-specific NSFont extensions from Mac Catalyst.
  • Excludes the UIUpdateLink-based SheetAnimator implementation from Mac Catalyst.
  • Marks the custom spring animator APIs as unavailable on Mac Catalyst.
  • Uses the existing UIViewPropertyAnimator path for bottom-sheet animations on Mac Catalyst.

Existing iOS and visionOS behavior remains unchanged.

Binary change

No meaningful binary-size impact is expected. This change only adjusts platform-specific compilation.

Verification

Verified that the FluentUI scheme builds for the generic Mac Catalyst destination in Release configuration.

Visual Verification

Not applicable; this is a build compatibility change with no intended visual impact.

Pull request checklist

This PR has considered:

  • Light and Dark appearances
  • iOS supported versions (all major versions greater than or equal current target deployment version)
  • VoiceOver and Keyboard Accessibility
  • Internationalization and Right to Left layouts
  • Different resolutions (1x, 2x, 3x)
  • Size classes and window sizes (iPhone vs iPad, notched devices, multitasking, different window sizes, etc)
  • iPad Pointer interaction
  • SwiftUI consumption (validation or new demo scenarios needed)
  • Objective-C exposure (provide it only if needed)

No changes to appearance, accessibility, localization, layout, pointer interaction, SwiftUI consumption, or Objective-C exposure are expected.

Microsoft Reviewers: Open in CodeFlow

@thomasjross
T.J. Ross (thomasjross) requested a review from a team as a code owner August 26, 2026 20:19
@thomasjross

Copy link
Copy Markdown
Contributor Author

One possible follow-up would be to hide the platform conditionals behind a small facade in BottomSheetController. The shared call sites could invoke helpers such as startCustomSpringAnimationIfSupported, setHighFrameRateIdleIfSupported, and completeCustomSpringAnimationIfNeeded, with the Mac Catalyst implementation falling back or doing nothing as appropriate.

That would keep the #if !targetEnvironment(macCatalyst) checks localized around the unsupported animator rather than distributing them through the controller’s animation flow. I kept this PR focused on the minimal build fix, but I could do that refactor maintainers would prefer to include it here.

@joannaquu

Copy link
Copy Markdown
Contributor

what UIUpdateLink api is unavailable? I see it's available from Mac Catalyst 18+ https://developer.apple.com/documentation/uikit/uiupdatelink

@joannaquu

Copy link
Copy Markdown
Contributor

Mike Schreiber (@mischreiber) is it worth adding catalyst validation or are we still "unofficially" supporting catalyst

@thomasjross

Copy link
Copy Markdown
Contributor Author

what UIUpdateLink api is unavailable? I see it's available from Mac Catalyst 18+ https://developer.apple.com/documentation/uikit/uiupdatelink

I think Apple's documentation is wrong. The header in the Catalyst SDK explicitly marks UIUpdateLink as API_UNAVAILABLE(macCatalyst) and the compiler seems emit an error if it is referenced or constructed.

We could probably rebuild this using CADisplayLink for Catalyst while retaining UIUpdateLink on iOS/visionOS. That feels a bit unnecessary to me based on the Catalyst usage, but open to feedback.

This branch has not been deployed

No deployments
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.

2 participants