Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SPM support for visionOS #2098

Merged
merged 1 commit into from
Oct 17, 2024
Merged

Fix SPM support for visionOS #2098

merged 1 commit into from
Oct 17, 2024

Conversation

thomasjross
Copy link
Contributor

@thomasjross thomasjross commented Oct 17, 2024

Platforms Impacted

  • iOS
  • visionOS
  • macOS

Description of changes

Importing FluentUI via SPM on visionOS does not work as expected. The Fluent classes are not exposed and the package has no public interfaces. iOS and Mac both export their internal targets, but nothing is exported on visionOS. This changes the package to also export the FluentUI_ios target for visionOS.

As a workaround, clients can directly import the FluentUI_ios target on visionOS:

#if os(visionOS)
import FluentUI_ios
#else
import FluentUI
#endif

Binary change

N/A

Verification

A test app was created which adds FluentUI as a Swift package. Within the module, I was able to import FluentUI and build properly for iOS; building for visionOS was unsuccessful due to missing definitions unless I used the workaround mentioned above. With this change, that workaround is not needed and the test app builds with a standard import of FluentUI.

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)
Microsoft Reviewers: Open in CodeFlow

@thomasjross thomasjross requested a review from a team as a code owner October 17, 2024 19:11
@mischreiber mischreiber enabled auto-merge (squash) October 17, 2024 20:22
@mischreiber mischreiber mentioned this pull request Oct 17, 2024
12 tasks
@mischreiber mischreiber merged commit 5fe0c37 into microsoft:main Oct 17, 2024
7 checks passed
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