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

FB14667312: Breaking - Invalid Binaries for macOS Apps Using QuickLook in Xcode 16 Beta #560

Open
macmade opened this issue Sep 25, 2024 · 3 comments

Comments

@macmade
Copy link

macmade commented Sep 25, 2024

  • Date: 2024-08-05
  • Resolution: Potential fix identified - For a future OS update
  • Area: Xcode
  • OS: macOS
  • Type: Incorrect/Unexpected Behavior
  • Keywords: xcode, linking, linker, crash, quicklook, quicklookui, framework

Details

What version of Xcode are you using?

Xcode Version 16.0 beta 4 (16A5211f)

Did you see an error message?

Yes

What was the error?

Dyld Error Message - Library not loaded: /System/Library/Frameworks/QuickLookUI.framework/Versions/A/QuickLookUI

What devices were you using when the issue occurred?

Mac

When did the issue most recently occur?

2024-08-05T15:31:06+02:00

Description

Xcode 16 beta produces invalid binaries for macOS apps using QuickLook when targetting macOS 11 BigSur or earlier.
The produced apps crash at launch on macOS 11 and earlier due to an incorrect path for the QuickLookUI framework, with the following error:

Dyld Error Message:
Library not loaded: /System/Library/Frameworks/QuickLookUI.framework/Versions/A/QuickLookUI
Reason: image not found

On macOS 11 and earlier, QuickLookUI is located inside the Quartz framework.
Thus, an app targeting these versions should link to:

/System/Library/Frameworks/Quartz.framework/Versions/A/Quartz

Xcode 15.4 handles this correctly.
However, Xcode 16 beta incorrectly links directly to:

/System/Library/Frameworks/QuickLookUI.framework

This issue causes all apps using QuickLook to crash on macOS 11 and earlier when built with Xcode 16.

Attached is an Xcode project demonstrating the issue.
QuickLookUI is imported from a Swift file as such:

import QuickLookUI

Two binaries built from this project are also attached.
One is built with Xcode 15.4, the other with Xcode 16 beta 4.

You can see the linking difference using:

otool -L QLTestApp-Xcode-15
otool -L QLTestApp-Xcode-16

QLTestApp-Xcode-15 (architecture x86_64):
    /System/Library/Frameworks/Quartz.framework/Versions/A/Quartz (compatibility version 1.0.0, current version 1266.4.2)
QLTestApp-Xcode-15 (architecture arm64):
/System/Library/Frameworks/Quartz.framework/Versions/A/Quartz (compatibility version 1.0.0, current version 0.0.0)

QLTestApp-Xcode-16 (architecture x86_64):
    /System/Library/Frameworks/QuickLookUI.framework/Versions/A/QuickLookUI (compatibility version 1.0.0, current version 0.0.0)
QLTestApp-Xcode-16 (architecture arm64):
    /System/Library/Frameworks/QuickLookUI.framework/Versions/A/QuickLookUI (compatibility version 1.0.0, current version 0.0.0)

Files

QLTestApp.zip
QLTestApp-Xcode-16.zip
QLTestApp-Xcode-15.zip

@macmade
Copy link
Author

macmade commented Sep 25, 2024

The issue is still present in Xcode 16 beta 6 (16A5230g).

@macmade
Copy link
Author

macmade commented Sep 25, 2024

The issue is still present in Xcode 16 RC (16A242).

@macmade
Copy link
Author

macmade commented Sep 25, 2024

The issue is still present in the final version of Xcode 16.

This is a significant issue since we can no longer build our apps with the current version of Xcode.
It also means we cannot update to macOS Sequoia since Xcode 15 doesn't run, which is a major problem for my company.

Please fix this.

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

No branches or pull requests

1 participant