QuickLook

RSS for tag

Create previews of files to use inside your app or perform simple edits on previews using QuickLook.

Posts under QuickLook tag

40 Posts

Post

Replies

Boosts

Views

Activity

QLPreviewPanel takes forever to load content preview in macOS 26
After upgrading to macOS 26, I noticed that showing a Quicklook preview in my app is very slow. Showing small text files is fine, but some other files I've tried, such as a Numbers document, take about 30 seconds (during which the indeterminate loading indicator appears) before the preview is shown. When showing the preview of an app, such as Xcode, the panel opens immediately with a placeholder image for the Xcode icon, and the actual Xcode icon is shown only after about 25 seconds. During this time many logs appear: FPItemsFromURLsWithTimeout timed out (5.000000s) for: file:///.file/id=6571367.2/ (/) FPItemsFromURLsWithTimeout timed out (5.000000s) for: file:///.file/id=6571367.23684/ (/Users) FPItemsFromURLsWithTimeout timed out (5.000000s) for: file:///.file/id=6571367.248032/ (/Users/n{9}k) FPItemsFromURLsWithTimeout timed out (5.000000s) for: file:///.file/id=6571367.248084/ (/Users/n{9}k/Downloads) Failed to add registration dmf.policy.monitor.app with error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.dmd.policy was invalidated: failed at lookup with error 159 - Sandbox restriction." UserInfo={NSDebugDescription=The connection to service named com.apple.dmd.policy was invalidated: failed at lookup with error 159 - Sandbox restriction.} Failed to register application policy monitor with identifier 69DDBDB4-0736-42FA-BA7A-C8D7EA049E29 for types {( applicationcategories, websites, categories, applications )} with error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.dmd.policy was invalidated: failed at lookup with error 159 - Sandbox restriction." UserInfo={NSDebugDescription=The connection to service named com.apple.dmd.policy was invalidated: failed at lookup with error 159 - Sandbox restriction.} FPItemsFromURLsWithTimeout timed out (5.000000s) for: file:///.file/id=6571367.155797561/ (~/Downloads/X{3}e.app) It seems that Quicklook tries to access each parent directory of the previewed file, and each one fails after 5 seconds. Why is Quicklook all of a sudden so slow? It used to be almost instant in macOS 15. I created FB20268201. import Cocoa import Quartz @main class AppDelegate: NSObject, NSApplicationDelegate, QLPreviewPanelDataSource, QLPreviewPanelDelegate { var url: URL? func applicationDidFinishLaunching(_ notification: Notification) { let openPanel = NSOpenPanel() openPanel.runModal() url = openPanel.urls[0] QLPreviewPanel.shared()!.makeKeyAndOrderFront(nil) } override func acceptsPreviewPanelControl(_ panel: QLPreviewPanel!) -> Bool { return true } override func beginPreviewPanelControl(_ panel: QLPreviewPanel!) { panel.dataSource = self panel.delegate = self } override func endPreviewPanelControl(_ panel: QLPreviewPanel!) { panel.dataSource = nil panel.delegate = nil } func numberOfPreviewItems(in panel: QLPreviewPanel!) -> Int { return 1 } func previewPanel(_ panel: QLPreviewPanel!, previewItemAt index: Int) -> QLPreviewItem! { return url as? QLPreviewItem } }
1
1
81
16h
How to resolve 'multiple UTIs, one file extension'
My PreviewCode app provides QuickLook previews and Finder icon thumbnails for source code files written in many popular programming languages. The only one it doesn't work will with is TypeScript, which typically uses the ts file extension. This is because Apple's CoreTypes bundle maps the ts file extension to its own MPEG-4 Transport Stream UTI. Right now I have two UTIs mapped to the ts extension: the above one and another, com.microsoft.typescript. The question is, how can I tell macOS' Launch Services to favour the latter over the former so that PreviewCode's previewer app extension is called whenever then user QuickLooks a TypeScript file and not (as currently happens) macOS' MPEG-4 previewer? I'd like to code this into PreviewCode or at the very least provide the technique in the response to the many tech support requests I get about this ts mix-up specifically.
0
0
70
Aug ’25
Quick Look Extension does not load MapKit map properly anymore, after macOS Sequoia
It appears that starting with macOS Sequoia, Quick Look Preview extension no longer loads MapKit maps correctly anymore. Map tiles do not appear, leaving users with a beige background. Users report that polylines do render correctly, but annotations appears black. This was previously working fine in prior macOS versions including Sonoma. STEPS TO REPRODUCE Create a macOS app project, with an associated document. Ensure project has a Quick Look preview extension, with necessary basic setups. Ensure that the extension mentioned in (2) must have a MKMapView. Any other cosmetic changes, etc, does not need to be implemented to observe the base issue. Do note that it has been reported that in addition to the map tiles not loading, annotations don't render correctly as well.
3
2
792
Aug ’25
Exporting .reality files from Reality Composer Pro
I've been using the MacOS XCode Reality Composer to export interactive .reality files that can be hosted on the web and linked to, triggering QuickLook to open the interactive AR experience. That works really well. I've just downloaded XCode 15 Beta which ships with the new Reality Composer Pro and I can't see a way to export to .reality files anymore. It seems that this is only for building apps that ship as native iOS etc apps, rather than that can be viewed in QuickLook. Am I missing something, or is it no longer possible to export .reality files? Thanks.
3
2
1.9k
Jul ’25
Quick Look Preview Extension works on macOS but not iOS
Hi, I have a document-based SwiftUI multiplatform app, where the document is saved as JSON. Obviously I don't want Quick Look to show the JSON of my file, so I made a Quick Look Preview extension for each platform. The macOS one works… okay, sometimes it's tricky to test and I need to use qlmanage to empty the cache or to show the preview, but it does work. I can even debug it. But the iOS one just never seems to be run. If I show Quick Look in the Files app on iOS, or if I AirDrop a file from my app to my iPhone, it shows as JSON, with an option to open it in my app. If I run the iOS Preview Extension in the debugger and launch the Files app, and then try to use Quick Look in a file there, it shows the JSON and the debugger just stays in the state 'Waiting to Attach'. The preview extensions are not data based; in both of them I have implemented func preparePreviewOfFile(at url: URL) async throws in PreviewViewController.swift. Pretty much the same code except one is using a UIHostingController and the other is using an NSHostingController. The only difference in the Info.plists for the two extensions is that the iOS one uses NSExtensionMainStoryboard while the macOS one uses NSExtensionPrincipalClass. This is how they were set up when I created them from the relevant Quick Look Preview Extension templates. I made a sample project with a much simpler document, UI, etc. and I have the same issue there. The macOS preview works, the iOS one never runs. I have checked that the correct preview extension is embedded in the target for each OS (under Embed Foundation Extensions in the Build Phases) Is there anything I need to do differently in iOS, or anything I might have inadvertently got wrong? Is there a way to run something similar to qlmanage on iOS, since that sometimes seems to help on macOS? Incidentally, I have also added Quick Look Thumbnail extensions, and they work on both platforms.
2
0
142
Jul ’25
Spatial Gallery App functionality
Similar to the visionOS Spatial Gallery app, I'm developing a visionOS app that will show spatial photos and videos. Is it possible to re-create the horizontal (or a vertical) scrolling functionality that shows spatial photos and spatial video previews? Does the Spatial Gallery app use private APIs to create this functionality? I've been looking at the Quick Look documentation and have been able to use the PreviewApplication to show a single preview, but do not see anything for a collection of files as the Spatial Gallery app presents in the scrolling view. Any insights or direction on how this may be done is greatly appreciated.
2
0
113
Jun ’25
iOS 26 beta - Crash using QLPreviewController (QuickLook) in simulator.
Using the iOS 26 beta simulator, I am experiencing a crash using the QLPreviewController. This is easily reproduced using a small sample app and a sample excel file in the bundle. It does work in prior Xcode 16.4 and simulators (18.5). I didn't find any mention of this in Xcode 26 or iOS 26 release notes but I could have missed something. I don't have a spare device to update to iOS 26 and try on a real device so it may just be a simulator issue? Any feedback would be helpful. Thanks. Error: QuickLook/QLHostRemoteViewModel.swift:37: Fatal error: No extensions could be found matching '_AppExtensionQuery(extensionPointIdentifier: "com.apple.quicklook.UIExtensionPoint", predicate: nil, hostAuditToken: nil, extensionPoint: nil, allowsDuplicates: true)' Sample view controller... import UIKit import QuickLook class ViewController: UIViewController, QLPreviewControllerDataSource { var excelFileURL: URL! override func viewDidLoad() { super.viewDidLoad() // Load the Excel file (example: from bundle) if let url = Bundle.main.url(forResource: "file_example_XLSX_100", withExtension: "xlsx") { excelFileURL = url presentPreviewController() } } func presentPreviewController() { let previewController = QLPreviewController() previewController.dataSource = self present(previewController, animated: true, completion: nil) } // MARK: - QLPreviewControllerDataSource func numberOfPreviewItems(in controller: QLPreviewController) -> Int { return 1 } func previewController(_ controller: QLPreviewController, previewItemAt index: Int) -> QLPreviewItem { return excelFileURL as QLPreviewItem } }
4
5
483
Jun ’25
Increased Memory Limit for QL Preview Generator
we have written a QL preview generator for some 3D data formats not supported by the AR Quicklook generators included in iOS. however, we are struggeling with the 100 MB memory ceiling imposed on an app extension in iOS. we have included the "Increased Memory Limit" entitlement in both the app and in the preview extensions. nevertheless, the preview generator is limited to 100 MB, even on most recent devices like iPhone 16 Pro Max. we can even see 100 MB limit when we attach to the process with Xcode. my question: did we miss anything? are there additional steps necessary to obtain the increased memory limit? must we explicitly apply for it? 500 MB would be fine (our preview generator does not load textures). best regards
2
0
83
May ’25
How to debug Quick Look Preview Extension
I'm facing the same problem as addressed in this discussion: After switching from legacy QLGenerators to Preview extensions on macOS I cannot debug the extensions' code in Xcode, anymore: I launch the app with the embedded appex from Xcode in debug mode. When trying to attach to the appex process the following error is reported: Code: 6 Failure Reason: Ensure “AppName Preview” is not already running, and matthias has permission to debug it. User Info: {... } System Information macOS Version 15.4.1 (Build 24E263) Xcode 16.3 (23785) (Build 16E140) Timestamp: 2025-05-12T14:07:14+02:00 I'm using a standard user account (no admin) and might miss some obvious steps. Can someone detail the steps to debug a Preview (or Thumbnail) extension with Xcode 16? For legacy Quick Look plugins I was using "qlmanage", but that's not working on extensions. All the best, Matthias P.S.: Pardon me re-posting my reply as a separate thread, to increase visibility, but I'm quite desperate and couldn't find any solution on the web...
1
1
113
May ’25
ar quicklook suddenly is grayed out on iphone 15 pro
ar quicklook suddenly is grayed out on iphone 15 pro, I bought the phone new recently ot was working great, 2 days ago updated to ios 18.1.4, ar mode kept opening but i started getting a move iphone over surface message and the object wouldn’t detect surfaces correctly, updated to ios 18.5, now when i open quicklook modesl ar is completely greyed out, can someone help me fix or detect the issue thank you
1
1
134
May ’25
How to debug Quick Look Preview Extension
When I launch the Quick Look Preview Extension target in Xcode, an app called Quick Look Simulator opens with an almost empty window: Online I read that the Terminal command qlmanage allows to test Quick Look plugins (which I think were an older format for creating Quick Look extensions), but running qlmanage -p /path/to/previewed/file -c public.text -g /path/to/QuickLookPreviewExtension.appex (where QuickLookPreviewExtension.appex is generated by the Xcode build and is located in the DerivedData folder) gives an error Can't get generator at QuickLookPreviewExtension.appex How can I debug a Quick Look Preview Extension?
3
2
882
May ’25
Add MacOs Finder compatible Quicklook Extension for custom file types to Mac Catalyst App
I have an iOS app which has an embedded Quicklook Extension that works perfectly - in the Files app on iPad/iPhone I can QuickLook view and edit custom file types without problems. However, when I run the app on a Silicon Mac using Mac Catalyst (or (Made For iPad)) while the Finder does recognise the custom file types (allowing "Open in…" or double-clicking to open) it does not show the Quick Look extension. How do I add Finder QuickLook extension functionality to a Mac Catalyst app? Thanks
2
0
75
Apr ’25
Implement Continuity Markup in Mac app?
Hello, is there a way to implement Continuity Markup in our own apps? (This is what I'm talking about: https://support.apple.com/en-us/102269 , scroll down to "Use Continuity Markup"). Also, why does a QuickLook panel (QLPreviewPanel.shared()) not display the markup options when triggered from my app for png image files in my app's Group Container? Do I need to implement certain NSServicesMenuRequestor methods for that? Sadly, I could not find any docs on that. Thank you, – Matthias
0
0
92
Apr ’25
iOS 18.3.1 - QLPreviewControllerView closing triggers AX Lookup problem - errorCode:1100 error:Permission denied portName:'com.apple.iphone.axserver' PID:1022
Since iOS 18.3.1, In lower iOS versions it works fine though. QLPreviewController shows a blank white screen instead of showing the document. Additionally, it does not display the 'Done' option at the top-right to close the view. Presenting the QLPreviewController works fine to display the document, but for the second time, it renders the blank white screen as described. While launching QLPreviewControllerView for the first time. I'm receiving the following message in the console and it displays the document. LaunchServices: store (null) or url (null) was nil: Error Domain=NSOSStatusErrorDomain Code=-54 "process may not map database" UserInfo={NSDebugDescription=process may not map database, _LSLine=72, _LSFunction=_LSServer_GetServerStoreForConnectionWithCompletionHandler} Attempt to map database failed: permission was denied. This attempt will not be retried. Closing the QLPreviewController with the help of the 'Done' option from top-right or swipe to close triggers the following message in the console. Connection to appex interrupted AX Lookup problem - errorCode:1100 error:Permission denied portName:'com.apple.iphone.axserver' PID:1022 ( 0 AXRuntime 0x00000001d2cd7758 _AXGetPortFromCache + 796 1 AXRuntime 0x00000001d2cdd02c AXUIElementPerformFencedActionWithValue + 700 2 UIKit 0x0000000258cdf488 7F0274D9-D3C9-3193-B606-1C74BE53B86C + 1537160 3 libdispatch.dylib 0x0000000101bb888c _dispatch_call_block_and_release + 32 4 libdispatch.dylib 0x0000000101bba578 _dispatch_client_callout + 20 5 libdispatch.dylib 0x0000000101bc2454 _dispatch_lane_serial_drain + 840 6 libdispatch.dylib 0x0000000101bc325c _dispatch_lane_invoke + 408 7 libdispatch.dylib 0x0000000101bd06fc _dispatch_root_queue_drain_deferred_wlh + 328 8 libdispatch.dylib 0x0000000101bcfd0c _dispatch_workloop_worker_thread + 580 9 libsystem_pthread.dylib 0x0000000225ea4680 _pthread_wqthread + 288 10 libsystem_pthread.dylib 0x0000000225ea2474 start_wqthread + 8 ) Trying to open he document again, Ultimately results in the white blank screen to be displayed with no options to close. It displays the Navigation bar only for the fraction of time. Leading users to force close the app and start again.
1
0
167
Mar ’25
AR QuickLook Frame Rate Questions
When I've made an animated UDSZ, at what framerate will the animation be rendered in QuickLook? Is it the same across all devices? (iPhone, Apple Vision Pro, etc.) and viewing environments? (QuickLook, inside an ARView, etc.) Suppose I export my file at 30fps and the device draws at 60fps, does the device interpolate between frames automatically, animate at a lower frame rate, or play it at twice the speed? What if it were 24fps? My primary concern with understanding frame rates is a bit of trouble I've had making perfectly looping animations. There always seems to be the slightest stutter between iterations. Thanks in advance for any insights you're able to provide!
1
0
219
Mar ’25
iOS not calling my Quick Look extension for RAW files recognized by the system
I'm the developer of Camera RawX (avail on the Mac App Store). I'm working on Camera RawX for iOS to provide Quick Look support for camera RAW files not supported by iOS. I use the Files app to open a RAW file to invoke Quick Look on my iPad (it is running iOS 17.6.1). The RAW file in question is a Fuji compressed RAF file. When I tap on the RAF file, iOS opens the Quick Look window, but my app's Quick Look extension is not called. If the RAW file in question is a Sigma Foveon X3F file, a file that has no native Apple RAW support, then my Quick Look extension is called and I'm able to display the image in the Quick Look window without issue. It seems that a system recognized RAW file extension (RAF in this case), is not triggering my Quick Look extension. On the macOS, this works fine without any issue. The strange thing is that my Thumbnail extension is being called when the RAW files show up in Files. Even if it is a RAF file. So it seems like a bug to me or am I missing something crucial in my Info.plist file? Albert
8
1
807
Feb ’25
QuickLook Library updated text tampered on PDF
We were using below delegate methods from QuickLook to get modified PDF file URL after the sketching But we are not able see the multi line text properly laid out on PDF and part of text missing. Same time Other pencil kit tools are working as expected. `func previewController(_ controller: QLPreviewController, didSaveEditedCopyOf previewItem: QLPreviewItem, at modifiedContentsURL: URL) func previewController(_ controller: QLPreviewController, didUpdateContentsOf previewItem: any QLPreviewItem)` We tested all code in iOS 18.2. Please let us know if the text edited URL on PDF can be retrieved in any possible way without tampering text
0
0
348
Feb ’25