Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix crash with #available and .environment on visionOS #2030

Merged
merged 2 commits into from
May 22, 2024

Conversation

joannaquu
Copy link
Contributor

@joannaquu joannaquu commented May 21, 2024

Platforms Impacted

  • iOS
  • visionOS
  • macOS

Description of changes

There seems to be an apple bug where using #available with .environment causes a crash on visionOS. Potentially related to #1984. As a workaround, move the modifier to its own ifdef.

While I'm here, replace magic numbers with global tokens.

Binary change

Total increase: 1,240 bytes
Total decrease: 0 bytes

File Before After Delta
Total 31,099,792 bytes 31,101,032 bytes ⚠️ 1,240 bytes
Full breakdown
File Before After Delta
FluentList.o 72,352 bytes 73,400 bytes ⚠️ 1,048 bytes
__.SYMDEF 4,811,616 bytes 4,811,808 bytes ⚠️ 192 bytes

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

@joannaquu joannaquu requested a review from a team as a code owner May 21, 2024 21:40
@joannaquu joannaquu merged commit 6c1d81d into microsoft:main May 22, 2024
7 checks passed
@joannaquu joannaquu deleted the joannaqu/env-crash branch May 22, 2024 02:45
@joannaquu joannaquu mentioned this pull request May 23, 2024
12 tasks
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants