App was crashing in xcode 16 due to Quicklook UI framework

QLPreviewView was used in the app to display the file previews. But the following crash was happening.

Date/Time: 2024-09-13 22:03:59.056 +0530 OS Version: Mac OS X 10.13.6 (17G14042) Report Version: 12 Anonymous UUID: 7CA3750A-2BDD-3FFF-5940-E5EEAE2E55F5

Time Awake Since Boot: 4300 seconds

System Integrity Protection: disabled

Notes: Translocated Process

Crashed Thread: 0

Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY

Termination Reason: DYLD, [0x1] Library missing

Application Specific Information: dyld: launch, loading dependent libraries

Dyld Error Message: Library not loaded: /System/Library/Frameworks/QuickLookUI.framework/Versions/A/QuickLookUI Referenced from: /private/var/folders/*/Notebook (Beta).app/Contents/MacOS/Notebook (Beta) Reason: image not found

@sekharfromIndia Take a look at the documentation for debugging techniques that has guidance on debugging common reasons for a crash. If you get stuck, let us know what you tried, and attach the fully symbolicated Apple crash report in your reply. Posting a Crash Report explains how to do so.

When the app was build through Xcode 16RC the app was crashed in the devices macOS version having macOS 10.13, 10.14, 10.15. If the app was build through Xcode 15 the app was working fine in all the devices.

The crash report says QuicklookUI framework not found. As a part of testing, I commented all the code which uses QuicklookUI API's and the App was running fine in all the devices.

Now, the issue is why the App was building fine in Xcode 15 and not in Xcode 16. Please find the below crash report.

Process:               Notebook (Beta) [4365]
Path:                  /private/var/folders/*/Notebook (Beta).app/Contents/MacOS/Notebook (Beta)
Identifier:            com.zoho.notebook.macbeta
Version:               5.5 (55008)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Notebook (Beta) [4365]
User ID:               501

Date/Time:             2024-09-13 22:03:59.056 +0530
OS Version:            Mac OS X 10.13.6 (17G14042)
Report Version:        12
Anonymous UUID:        7CA3750A-2BDD-3FFF-5940-E5EEAE2E55F5


Time Awake Since Boot: 4300 seconds

System Integrity Protection: disabled

Notes:                 Translocated Process

Crashed Thread:        0

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    DYLD, [0x1] Library missing

Application Specific Information:
dyld: launch, loading dependent libraries

Dyld Error Message:
  Library not loaded: /System/Library/Frameworks/QuickLookUI.framework/Versions/A/QuickLookUI
  Referenced from: /private/var/folders/*/Notebook (Beta).app/Contents/MacOS/Notebook (Beta)
  Reason: image not found

Binary Images:
       0x107fe7000 -        0x10a404ff7 +com.zoho.notebook.macbeta (5.5 - 55008) <F39B7945-5603-3334-AA66-53526780240F> /var/folders/*/Notebook (Beta).app/Contents/MacOS/Notebook (Beta)
       0x10a815000 -        0x10a829ff7 +libswiftAppKit.dylib (5.0.1 - 1001.0.82.4) <1297109A-D760-3C74-A36C-C0273A7217EC> /var/folders/*/Notebook (Beta).app/Contents/Frameworks/libswiftAppKit.dylib
       0x10a84e000 -        0x10a8a5fff +org.cocoapods.Alamofire (4.9.1 - 1) <AFBD5417-71E4-3BF8-8CE7-46AAF03F8507> /var/folders/*/Notebook (Beta).app/Contents/Frameworks/Alamofire.framework/Versions/A/Alamofire
       0x10a943000 -        0x10a959fff +org.cocoapods.AlamofireImage (3.6.0 - 1) <B5915CE0-0C9B-3733-971E-19369BE3BB2D> /var/folders/*/Notebook (Beta).app/Contents/Frameworks/AlamofireImage.framework/Versions/A/AlamofireImage
       0x10a98b000 -        0x10aa1eff7 +com.zoho.Apptics (1.0.2 - 1.0.2) <D6B4A610-C6EE-3C5A-BFB3-3550152C0858> /var/folders/*/Notebook (Beta).app/Contents/Frameworks/Apptics.framework/Versions/A/Apptics
       0x10aa9b000 -        0x10ab0efff +com.zoho.apptics.AppticsCrashKit (1.0.2 - 1.0.2) <84934D43-7E9B-3BC0-A157-7C395D2F459D> /var/folders/*/Notebook (Beta).app/Contents/Frameworks/AppticsCrashKit.framework/Versions/A/AppticsCrashKit
       0x10ab68000 -        0x10ab6ffff +com.zoho.apptics.AppticsEventTracker (1.0.2 - 1.0.2) <0396DF40-CD2A-321B-B8F9-7016093A598A> /var/folders/*/Notebook (Beta).app/Contents/Frameworks/AppticsEventTracker.framework/Versions/A/AppticsEventTracker
       0x10ab83000 -        0x10ab8aff7 +com.zoho.apptics.AppticsScreenTracker (1.0.2 - 1.0.2) <B0469D30-F322-35C5-89CA-8DAA2873EA37> /var/folders/*/Notebook (Beta).app/Contents/Frameworks/AppticsScreenTracker.framework/Versions/A/AppticsScreenTracker
       0x10aba1000 -        0x10aba1ffd +org.cocoapods.Apptics-SDK (1.0.2 - 1) <5E3E2628-08F9-3E13-A691-E86DEB5CADD4> /var/folders/*/Notebook (Beta).app/Contents/Frameworks/Apptics_SDK.framework/Versions/A/Apptics_SDK
       0x10abab000 -        0x10abafff7 +org.cocoapods.Apptics-Swift (1.0.2 - 1) <CA69C863-BF87-35E2-92FA-5CBFE1AFC37E> /var/folders/*/Notebook (Beta).app/Contents/Frameworks/Apptics_Swift.framework/Versions/A/Apptics_Swift
       0x10abc0000 -        0x10abd7fff +org.cocoapods.CocoaLumberjack (3.0.0 - 1) <1B9A14EC-4123-305C-BEAF-08BFA1D40DEB> /var/folders/*/Notebook (Beta).app/Contents/Frameworks/CocoaLumberjack.framework/Versions/A/CocoaLumberjack
       0x10abfd000 -        0x10ac46ffb +org.cocoapods.HTMLKit (4.2.0 - 1) <965E0DA1-8FB9-3A87-AD6F-D6DD8574884F> /var/folders/*/Notebook (Beta).app/Contents/Frameworks/HTMLKit.framework/Versions/A/HTMLKit
       0x10acb7000 -        0x10accaff7 +org.cocoapods.Kanna (4.0.3 - 1) <C052C167-FD6C-3978-B3E0-2E16CA9E49BA> /var/folders/*/Notebook (Beta).app/Contents/Frameworks/Kanna.framework/Versions/A/Kanna
       0x10acf8000 -        0x10ad1afff +org.cocoapods.KeychainAccess (3.2.1 - 1) <15056EE9-A504-3B6D-BFF4-0D1F54663311> /var/folders/*/Notebook (Beta).app/Contents/Frameworks/KeychainAccess.framework/Versions/A/KeychainAccess
       0x10ad4a000 -        0x10ad52ff7 +org.cocoapods.MRFetchedResultsController (0.2.1 - 1) <5E57B8A7-C5F7-34D5-929F-013B59157E6D> /var/folders/*/Notebook (Beta).app/Contents/Frameworks/MRFetchedResultsController.framework/Versions/A/MRFetchedResultsController
       0x10ad6c000 -        0x10ad6dff3 +org.cocoapods.NSColor-HexString (1.0.0 - 1) <606797B7-7D96-304E-A6A3-790FC802885A> /var/folders/*/Notebook (Beta).app/Contents/Frameworks/NSColor_HexString.framework/Versions/A/NSColor_HexString
       0x10ad78000 -        0x10add6fff +org.cocoapods.PEXLibrary (1.0.13 - 1) <E7B88ACD-051F-37B8-A881-BF9F564B990D> /var/folders/*/Notebook (Beta).app/Contents/Frameworks/PEXLibrary.framework/Versions/A/PEXLibrary
       0x10ae76000 -        0x10ae83ff7 +org.cocoapods.RNCryptor (5.1.0 - 1) <BD99463E-AE7B-32D3-97AA-53D341C39D60> /var/folders/*/Notebook (Beta).app/Contents/Frameworks/RNCryptor.framework/Versions/A/RNCryptor
       0x10aea0000 -        0x10aeb4ffb +org.cocoapods.SSZipArchive (2.4.3 - 1) <D3485EAA-C398-3F10-BEBA-1E6888D6310B> /var/folders/*/Notebook (Beta).app/Contents/Frameworks/SSZipArchive.framework/Versions/A/SSZipArchive
       0x10aed2000 -        0x10aefafff +org.cocoapods.Starscream (4.0.8 - 1) <F78B030E-DC2C-34DC-864B-BAAF655CBECD> /var/folders/*/Notebook (Beta).app/Contents/Frameworks/Starscream.framework/Versions/A/Starscream
       0x10af50000 -        0x10af6bfff +org.cocoapods.SwiftLinkPreview (3.2.0 - 1) <ABC8D445-A673-3F28-8FE9-F5026E3D0C06> /var/folders/*/Notebook (Beta).app/Contents/Frameworks/SwiftLinkPreview.framework/Versions/A/SwiftLinkPreview
       0x10af9d000 -        0x10b02ffff +org.cocoapods.SwiftSoup (2.3.8 - 1) <298FB820-753B-3C78-A1D2-124F8A3A1802> /var/folders/*/Notebook (Beta).app/Contents/Frameworks/SwiftSoup.framework/Versions/A/SwiftSoup
       0x10b0f3000 -        0x10b100fff +org.cocoapods.TraceKit (0.0.7 - 1) <1F292864-4158-30D5-9E79-A1DFF99FDD47> /var/folders/*/Notebook (Beta).app/Contents/Frameworks/TraceKit.framework/Versions/A/TraceKit
       0x10b125000 -        0x10b147ff7 +org.cocoapods.ZMacAuth (1.0.5 - 1) <E8D7F62A-D7B7-3E6F-BC68-74BC91628C78> /var/folders/*/Notebook (Beta).app/Contents/Frameworks/ZMacAuth.framework/Versions/A/ZMacAuth
       0x10b173000 -        0x10b17bfff +org.cocoapods.ZipArchive (1.4.0 - 1) <91087ED0-A0F5-3FAA-A307-973FAB5563CE> /var/folders/*/Notebook (Beta).app/Contents/Frameworks/ZipArchive.framework/Versions/A/ZipArchive
       0x10be31000 -        0x10be7badf  dyld (551.5) <CB9BFB56-4511-36F1-A546-891FF770C01C> /usr/lib/dyld
    0x7fff33ad8000 -     0x7fff33cb8ff3  com.apple.avfoundation (2.0 - 1536.36) <AB868021-AB26-3198-897D-087EF3B360EA> /System/Library/Frameworks/AVFoundation.framework/Versions/A/AVFoundation
    0x7fff34ede000 -     0x7fff35d3cfff  com.apple.AppKit (6.9 - 1561.61.100) <4E6EA3FA-8C2C-3B21-BFF9-6F8C458B7BE1> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
    0x7fff3688c000 -     0x7fff36c29fff  com.apple.CFNetwork (902.6 - 902.6) <46168F79-CCFA-349A-8508-B8CBCE27D440> /System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork
    0x7fff374c8000 -     0x7fff3781efef  com.apple.CoreData (120 - 851) <7361F2EA-2B7F-3259-909F-287BEB443781> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData
    0x7fff37903000 -     0x7fff37da6fe7  com.apple.CoreFoundation (6.9 - 1455.300) <CB44B892-64CD-3E32-A518-6D40B1A7033F> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
    0x7fff386aa000 -     0x7fff38715ff7  com.apple.corelocation (2245.0.41) <6BF57F70-732C-3140-B5A3-466ACF262765> /System/Library/Frameworks/CoreLocation.framework/Versions/A/CoreLocation
    0x7fff3916f000 -     0x7fff391cefff  com.apple.CoreSpotlight (1.0 - 231.4.8) <B4BD893F-7BCF-3B46-93EC-3FBF12614DC4> /System/Library/Frameworks/CoreSpotlight.framework/Versions/A/CoreSpotlight
    0x7fff39a67000 -     0x7fff39e2effb  com.apple.Foundation (6.9 - 1455.300) <0479E072-1DD0-3881-A9A2-EDAD3EE58C23> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
    0x7fff3b7a5000 -     0x7fff3b7bbff7  com.apple.LocalAuthentication (1.0 - 425.70.2) <F6E31D09-191C-395E-8FE7-2F422DBD2D17> /System/Library/Frameworks/LocalAuthentication.framework/Versions/A/LocalAuthentication
    0x7fff3b7bc000 -     0x7fff3b9c3ff7  com.apple.MapKit (1.0 - 1831.25.4.7.1) <0DD1E151-04C7-3D07-8410-243A6C306765> /System/Library/Frameworks/MapKit.framework/Versions/A/MapKit
    0x7fff42d05000 -     0x7fff42f51ff7  com.apple.QuartzCore (1.11 - 584.64.2) <FD9A3180-479E-3DAC-9CF0-0D214C7E46A7> /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore
    0x7fff43786000 -     0x7fff43ab1fff  com.apple.security (7.0 - 58286.70.19) <E118FC23-2E20-3999-826B-58488049A277> /System/Library/Frameworks/Security.framework/Versions/A/Security
    0x7fff43dd5000 -     0x7fff43de1ffb  com.apple.StoreKit (1.0 - 658.2) <BAB59B79-AC9B-3438-A4B3-DC0A7A1F02B0> /System/Library/Frameworks/StoreKit.framework/Versions/A/StoreKit
    0x7fff43f19000 -     0x7fff43f89ff3  com.apple.SystemConfiguration (1.17 - 1.17) <41D509AB-AED3-30FF-BB00-615BB5A8AC00> /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration
    0x7fff4657d000 -     0x7fff46a16fff  com.apple.WebKit (13605 - 13605.3.8) <1DDB40C0-5FB6-3495-B4CD-52D32251F88D> /System/Library/Frameworks/WebKit.framework/Versions/A/WebKit
    0x7fff5d5d9000 -     0x7fff5d5daffb  libSystem.B.dylib (1252.50.4) <5A02016C-8F9D-3F47-8C39-AD2CD4F9F11D> /usr/lib/libSystem.B.dylib
    0x7fff5d80f000 -     0x7fff5d865fff  libc++.1.dylib (400.9) <142D6292-F30F-3949-9F37-3C97A579F540> /usr/lib/libc++.1.dylib
    0x7fff5e247000 -     0x7fff5e338ff7  libiconv.2.dylib (51.50.1) <7965B866-C75A-3450-9891-0500349F7090> /usr/lib/libiconv.2.dylib
    0x7fff5e339000 -     0x7fff5e560ffb  libicucore.A.dylib (59181.0.1) <17767680-09DF-3954-AB6C-B13B41F92A2E> /usr/lib/libicucore.A.dylib
    0x7fff5f6ac000 -     0x7fff5f6beffb  libz.1.dylib (70) <47278BDC-596E-3037-B8DA-05FE9D5DBEF6> /usr/lib/libz.1.dylib

Model: MacBookPro11,5, BootROM 199.0.0.0.0, 4 processors, Intel Core i7, 2,5 GHz, 16 GB, SMC 2.30f2
Graphics: AMD Radeon R9 M370X, AMD Radeon R9 M370X, PCIe
Graphics: Intel Iris Pro, Intel Iris Pro, Built-In
Memory Module: BANK 0/DIMM0, 8 GB, DDR3, 1600 MHz, 0x802C, 0x31364B544631473634485A2D314736453120
Memory Module: BANK 1/DIMM0, 8 GB, DDR3, 1600 MHz, 0x802C, 0x31364B544631473634485A2D314736453120
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x152), Broadcom BCM43xx 1.0 (7.77.37.33.1a1)
Bluetooth: Version 6.0.7f22, 3 services, 27 devices, 1 incoming serial ports
Serial ATA Device: APPLE SSD SM0512G, 500,28 GB
USB Device: USB 3.0 Bus
USB Device: Apple Internal Keyboard / Trackpad
USB Device: Bluetooth USB Host Controller
Thunderbolt Bus: MacBook Pro, Apple Inc., 27.1

@DTS Engineer Seeing the exact same behavior here. App crashes with "Dyld Error", "Library not found: QuickLookUI" on macOS 10.15 if compiled with Xcode 16 on Sequoia, but works fine if compiled with Xcode 15 on Sonoma.

FB15139430

It seems it's not just macOS 10.15, it's also Big Sur. In fact, it's not about the macOS version - it's crashing on Intel Macs. We've just received a crash report from Big Sur with the same issue:

Code Type: X86-64 (Native)
Parent Process: ??? [1]
User ID: 501

Date/Time: 2024-09-18 12:48:44.261 +0700
OS Version: macOS 11.7.10 (20G1427)
Report Version: 12
Anonymous UUID: FCCC50AB-71DC-4908-AD86-EE79F2A7EDFF

Sleep/Wake UUID: FA9BC3F4-1F95-41BC-9153-EA509922FCFB

Time Awake Since Boot: 44000 seconds
Time Since Wake: 18000 seconds

System Integrity Protection: enabled

Crashed Thread: 0

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY

Termination Reason: DYLD, [0x1] Library missing

Application Specific Information:
dyld: launch, loading dependent libraries

Dyld Error Message:
   dyld: Using shared cache: 3694F5E4-3E85-3CD5-A2B0-534E2DFC1355
Library not loaded:
/System/Library/Frameworks/QuickLookUI.framework/Versions/A/QuickLookUI
   Referenced from:

I use the bear notes app and it was unable to open suddenly two days ago. Got the same crash report, so I went looking for QuickLookUI, it's missing from that directory. Im on an intel mac too.

@DTS Engineer

Any update on this?

In Recent macOS 15.1 Beta 5 Release date, It was mentioned that it was a known issue.

Was this going to be fixed or we have to look any alternatives?

Please provide the information

@DTS Engineer Having the same problem here: building an app on Xcode 16.0 on macOS Sonoma 14.7 results in an application that crashes on macOS Big Sur Intel machine with the same crash as mentioned above.

Building with Xcode 15.4 does not have this issue. However, we cannot build this branch on Xcode 15.x anymore due to code changes for Xcode 16 compatibility.

Is there a workaround? We're now stuck in an unreleasable state!

We are having the same crash under BigSur when our app is built with Xcode 16. Going back to building with Xcode 15.4 under macOS 14.5 Sonoma fixes the problem.

Same here: apps built with the GM version of Xcode 16 crash on Intel Macs because the QuicklookUI framework is not loaded.

It's really inexcusable that this made it to the production release of Xcode 16. It was reported (AND ACKNOWLEDGED!) in the beta period and nobody at Apple Engineering cared enough to do anything about it.

We PAY for this. Apple loves to brag about how the 30% fee it collects goes to support APIs and the platforms. Really? Does it? Does anyone here feel supported?

FIX THE BUG, Apple.

You can easily fix this yourself, just add QuickLookUI to your linked frameworks and set it to optional:

https://community.folivora.ai/t/bettertouchtool-will-not-launch/38688/4?u=andreas_hegenberg

Including QuickLookUI as optional does not work. The app no longer crashes but QuickLook functionality does not work.

The only true workaround seems to be building on Sonoma with Xcode 15.x.

Does anyone know if this has been addressed in Xcode 16.1?

After adding quicklookui as optional, the problem is solved partialy: the app starts under older macOS but the QuickLook functionality is not available - even after linking quicklook in addition to quicklookui

I got tired of booting into Sonoma to build. It's bad enough I have to boot into Monterey to get a 10.10,11,12 capable build.

I've created a small app (~184k) which does nothing except manage the preview panel. The app has no menu or dock icon. I've built the app on Monterey but any OS other than Sequoia will do. I include the helper app in my main app's bundle. My main app communicates with the helper via a custom URL scheme.

It took about 5 minutes to change the code in my main app. I no longer include the Quartz or Quicklook frameworks in my project. Simply removing the Quicklook framework will not work if Quartz is referenced. I can now build on Sequoia and the app runs on every OS I support.

The only different behaviour is that if you do a ⌘Q while the preview panel has the focus, it will not terminate the main app. I could more than likely get around this but the main app terminates the helper when terminated and it's not worth the effort.

If you build your app on Monterey, you don't need any helpers or tricks. An app compiled on macOS Sonoma or earlier (eg Monterey) supports QuickLook correctly on any macOS from High Sierra to Sequoia (inclusive). The problem is in building an app on Sequoia and Xcode 16 to work with QL on macOS BigSur and earlier.

To handle this issue, I had to install Sonoma with Xcode 15.4 on another volume. So now I'm developing in Sequoia/Xcode 16 but need to reboot to Sonoma/Xcode 15.4 in order to build and distribute (as I want to support 10.15+). Not perfect solution at all, but it may allow me to survive until this issue is fixed, as I release every 2-3 months.

App was crashing in xcode 16 due to Quicklook UI framework
 
 
Q