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

41 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

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
4
0
100
1d
(iOS 17 & 18) Using QLPreviewController in specific app, added text colour reverts to black on text edit
In the company that I work we have a huge app and we have implemented an image annotation feature using the QLPreviewController but there is a bug where even with an OOTB implementation of the QLPreviewController, when I add a text, change the colour of that text and then double click on the text to edit it, it reverts back to black. I tried the same implementation in a sample app but I couldn't reproduce the bug hence it is not a bug with the library but something with the app interacting with the library. I was wondering if anyone can provide any suggestion with what the reason may be, as sadly I cannot provide any code examples as that would break company code. From my research what I found strange is that when I double click the coloured text and it goes to black, then undo it its as if that was not a recorded event as the undo goes back to the step before the text was coloured meaning it replaces the colour changing event rather than recording it as a new event that can be undone. If any has any suggestion please help me as I am quite stuck. 🙏
1
0
155
1w
USDZ in Keynote
Apple's own USDZ files from their website does not display properly both in OPReview and in Keynote when imported. It displays properly, however, in Reality Converter bit with this error: "Invalid USD shader node in USD file Shader nodes must have “id” as the implementationSource, with id values that begin with “Usd”. Also, shader inputs with connections must each have a single, valid connection source." I tried importing other models from external sources and they work without any issue at all. Is there any potential fix or workaround this? Thanks in advance.
1
0
111
1w
Bug: Duplicate audio playback in QuickLook with .reality files in iOS 18
I'm experiencing an issue with QuickLook in iOS 18 where.reality files with audio playback are affected. When I open a.reality file that includes audio, the audio track plays twice: once from the moment the file is opened, and again from the start of the animation. This results in a duplicate audio playback. I've tested this issue on multiple devices running iOS 16, 17, and 18, and the problem only occurs on iOS 18. I've tried restarting the devices and checking for any software updates, but the issue persists. Steps to reproduce: Open a.reality file with audio playback in QuickLook on an iOS 18 device. Observe the audio playback. Expected result: The audio track should play only once, from the start of the animation. Actual result: The audio track plays twice, once from the moment the file is opened and again from the start of the animation. Device and iOS version: I've tested this issue on iPhone 12 Pro, iPhone 13 Pro running iOS 18, iPhone 13 running iOS 16 and iPhone 11 Pro running iOS 17,
1
0
84
6d
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
10
2
702
3d
App crash on the the app launch in Xcode 16 RC in the 10.13 device due to QuciklookUI framework.
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
3
0
194
2w
QLPreviewController Markup/Edit Mode background is white in Dark Mode
On iOS17, when the device is on Dark mode, the background of the Edit Mode in QLPreviewController has white color, instead of dark color. (like in the iOS18 betas) We support both iOS17 and iOS18 and we want our users to have a consistent experience, so we think this should be aligned in iOS17, as it's currently working in iOS18 betas. Steps: Set the device to Dark Mode. Present a QLPreviewController and preview an image. Enable Markup/Edit mode. Observe the image background Actual Result: The background is in white color. Expected Result: The background is in dark color. (Just like in iOS18 betas) Xcode 16b3, All iPhones.
2
0
314
Aug ’24
USD animation support in RealityKit vs. macOS Preview
This question is about USD animations playing correctly in macOS Preview but not with RealityKit on visionOS. I have a USD file created with 3D Studio Max that contains mesh-based smoke animation: https://drive.google.com/file/d/1L7Jophgvw0u0USSv-_0fPGuCuJtapmzo/view (5.6 MB) Apple's macOS 14.5 Preview app is able to play the animation correctly: However, when a visionOS app uses RealityKit to load that same USD file in visionOS 2.0 beta 4, built with 16.0 beta 3 (16A5202i), and Entity/playAnimation is called, the animation does not play as expected: This same app is able to successfully play animation of a hierarchy of solid objects read from a different USD file. When I inspect the RealityKit entities loaded from the USD file, the ground plane entity is a ModelEntity, as expected, but the smoke entity type is Entity, with no associated geometry. Why is it that macOS Preview can play the animation in the file, but RealityKit cannot? Thank you for considering this question.
1
0
518
Jul ’24
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?
0
2
299
Jul ’24
Help Building spatial video app using Quick Look preview
Hello everyone I am looking to build a simple app for displaying a spatial video using the quick look preview API. I have been following this video which is useful: https://developer.apple.com/videos/play/wwdc2024/10166/#:~:text=QuickLook%20is%20the%20system%20standard,just%20like%20the%20Photos%20app. I am new to building apps in Xcode, and I could do with some advice on how to build the rest of the project mentioned in the above video. I was wondering if there is source code or a project example available anywhere for an app the uses the Quick Look preview API?
0
0
271
Jul ’24
AR Quick Look IOS 18 Safari Error
When opening the 3D model in Augmented Reality on Safari, the model initially displays correctly. However, when attempting to move, resize, or rotate it, the device screen freezes along with the Augmented Reality view, and sometimes it crashes the application. This same model does not have any issues when opened in Chrome. Has anyone experienced something similar, and if so, do you know how to resolve it?
1
0
395
Jul ’24
QLPreviewController's PencilKit sub component doesn't get mirrored on RTL Languages in iOS18b3
QLPreviewController's PencilKit doesn't get mirrored when used with a RTL language in iOS18b3. Moreover, the sub-menu of the actions is not translated and is shown in English. Steps to reproduce: Set an app with QLPreviewController and set its app language to Hebrew (or any other RTL language) Run the app Tap the Markup button on bottom-left side. Look on the PencilKit element. Tap the + button to show the annotation actions. Look on the annotation actions menu. Current: The Pencil Kit element is not mirrored when app language is RTL Language and the sub-menu actions are shown in English. Expected: The Pencil Kit element is mirrored when app language is RTL Language and the sub-menu actions are shown in the RTL Language. Submitted Feedback: FB14452847 Notes: This wasn't reproducible in iOS 17.5.1 The top bar buttons are mirrored as expected with a RTL language.
5
0
494
Aug ’24
PreviewApplication open Spatial Video issue
Hi, I have a Spatial Video that I am trying to load in a visionOS app with PreviewApplication API let url = URL(string: "https://mauiman.azureedge.net/videos/SpatialJourney/watermelon_cat.MOV") let item = PreviewItem(url: url!) _ = PreviewApplication.open(items: [item]) When I run the application, I am getting the following error. Did I miss anything? QLUbiquitousItemFetcher: <QLUbiquitousItemFetcher: 0x6000022edfe0> could not create sandbox wrapper. Error: Error Domain=NSPOSIXErrorDomain Code=2 "couldn't issue sandbox extension com.apple.quicklook.readonly for '/videos/SpatialJourney/watermelon_cat.MOV': No such file or directory" UserInfo={NSDescription=couldn't issue sandbox extension com.apple.quicklook.readonly for '/videos/SpatialJourney/watermelon_cat.MOV': No such file or directory} #PreviewItem The screen shows up as: Putting the spatial video locally, I get the following error: let url = URL(fileURLWithPath: "watermelon_cat.MOV") let item = PreviewItem(url: url) _ = PreviewApplication.open(items: [item]) Error getting the size of file(watermelon_cat.MOV -- file:///) with error (Error Domain=NSCocoaErrorDomain Code=260 "The file “watermelon_cat.MOV” couldn’t be opened because there is no such file." UserInfo={NSURL=watermelon_cat.MOV -- file:///, NSFilePath=/watermelon_cat.MOV, NSUnderlyingError=0x600000ea1650 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}) #Generic Any help is greatly appreciated. Thank you in advance.
3
1
457
Jul ’24
QLPreviewController gets frozen after drawing in iOS17
There seem to be a regression in QLPreviewController with iOS17, since it works in both iOS16(latest) and iOS18b3. After following the steps (described below), using iOS17.X the QLPreviewController gets frozen up so all of it's top buttons are no tappable, although you can still draw on the canvas. Steps to reproduce: Setup QLPreviewController to preview a single image in png format. The QLPreviewController should be presented as the rootViewController of a UINavigationController. Present the UINavigationController that has the QLPreviewController as its rootViewController. Tap the Markup button. Pick the leftest tool from the PencilKit tools at the bottom. Draw a curvy long line from the bottom-right corner of the canvas, to the top-left corner of the canvas. Tap any of the top buttons. Current: The top buttons are not tappable. Expected: The top buttons are tappable. Any idea how to workaround/fix this issue? Notes: The issue seems to be reproducible in iOS17, and isn't reproducible in iOS16 or iOS18b3 using Xcode 15.4 and Xcode 16b3. The issue is reproducible in both iOS17 Simulator or devices. The issue is reproducible in both UIKit and SwiftUI. Possible same issue was mentioned here: https://stackoverflow.com/questions/78090416/navigation-toolbar-buttons-stop-working-after-keyboard-is-shown-on-ios-17-sw I couldn't attach a sample project to here due to file format limitation, but you can use the project from this repository and use a png instead of a pdf: https://github.com/NilCoalescing/SwiftUI-Code-Examples/tree/main/QuickLook/SwiftUIQuickLookInUINavigationController (code by Natalia Panferova) Attached is the image of the drawing done in iOS17.5 Simulator.
3
1
515
Aug ’24
QLPreviewController with SwiftUI
I'm having a problem where any buttons won't be shown when displaying a QLPreviewController with swift. With .quickLookPreview() these buttons are shown, including share, done, annotation etcetera. The buttons are not shown when using QLPreviewController with SwiftUI, however if used with other UIKit they are shown. How to fix this? I'm not really looking forward in implementing all of the annotation functions and other QuickLook capabilities again. The ultimate goal of mine is to allow annotation and other pdf editing with the ability to save the file via the Done button, but on .quickLookPreview() the Done button displays "Save to files" and "Discard" and on QLPreviewController the button is not shown. The issue has been addressed on several forums, yet a solution has not been found. Reproducement in nutshell: new QLPreviewController conforming to UIViewControllerRepresentable display the QLPreviewController in SwiftUI view Thanks.
2
0
559
Jul ’24
QLPreviewController Blinks on Previewing Some PDF files
QLPreview keeps blinking and stops previewing the file when opening some high-resolution PDF files with heavy content. This can only be simulated in a real device built in xcode simulators cant simulate the issue. Tested in Xcode Version 15.4 (15F31d) and iPadOS Version 17.5.1. Following is My Sample code : import UIKit import QuickLook class ViewController: UIViewController { var currentViewFilePath = "" let preview = QLPreviewController() override func viewDidLoad() { super.viewDidLoad() self.setupQLPreview() loaddata() // Do any additional setup after loading the view. } func loaddata(){ if let fileURL = Bundle.main.url(forResource: "CD28048D", withExtension: "pdf") { self.currentViewFilePath = fileURL.relativePath self.preview.reloadData() // Use the fileURL here print("File URL: \(fileURL)") } else { print("File not found") } } } extension ViewController:QLPreviewControllerDelegate,QLPreviewControllerDataSource{ func setupQLPreview(){ preview.delegate = self preview.dataSource = self self.view.addSubview(preview.view) let previewhight = (UIScreen.main.bounds.height - ((self.navigationController?.navigationBar.frame.height ?? 0))) preview.view.translatesAutoresizingMaskIntoConstraints = false preview.view.topAnchor.constraint(equalTo: self.view.topAnchor).isActive = true preview.view.leftAnchor.constraint(equalTo: self.view.leftAnchor,constant: 4).isActive = true preview.view.rightAnchor.constraint(equalTo: self.view.rightAnchor,constant: -4).isActive = true preview.view.leadingAnchor.constraint(equalTo: self.view.leadingAnchor,constant: 4).isActive = true preview.view.trailingAnchor.constraint(equalTo: self.view.trailingAnchor,constant: -4).isActive = true preview.view.widthAnchor.constraint(equalToConstant: self.view.frame.width-8).isActive = true preview.view.heightAnchor.constraint(equalToConstant: previewhight-4).isActive = true preview.view.bottomAnchor.constraint(equalTo: self.view.bottomAnchor).isActive = true preview.navigationController?.isNavigationBarHidden = true self.addChild(preview) preview.didMove(toParent: self) } func numberOfPreviewItems(in controller: QLPreviewController) -> Int { if self.currentViewFilePath.isEmpty || self.currentViewFilePath == ""{ return 0 }else{ return 1 } } func previewController(_ controller: QLPreviewController, previewItemAt index: Int) -> QLPreviewItem { let fileUrl = URL(fileURLWithPath: self.currentViewFilePath) return fileUrl as QLPreviewItem } } while running the above code Xcode debugger prints following errors: View service did terminate with error: Error Domain=_UIViewServiceInterfaceErrorDomain Code=3 "(null)" UserInfo={Message=Service Connection Interrupted} #Remote Preview collection viewServiceDidTerminateWithError: Error Domain=_UIViewServiceInterfaceErrorDomain Code=3 "(null)" UserInfo={Message=Service Connection Interrupted} #Remote [u 0AA9D4C5-BBA1-56F6-8FFF-F5F56B99399A:m (null)] [com.apple.quicklook.extension.previewUI(1.0)] Connection to plugin invalidated while in use.
0
1
371
Jul ’24
Saving edited PDFs directly to application from QuickLook
I'm stuck on a problem where I need to be able to have the same editing capabilities as in .quickLookPreview and be able to save the edited file to the application with the "Done" button. So, in nutshell, I need to implement the same functionality many other applications provide including Apple's Files. However with .quickLookPreview I don't get the ability to save edited files directly to the application, and I've had no luck finding help from the internet (thus this question). Perhaps somebody has implemented this before and could give me a lead somewhere? PS. I'm trying to find a solution without any third party libraries
1
0
363
Jul ’24
QuickLook sheet not opening in iOS
I'm developing an application in which saving files and opening them with .quickLookis in important role. However, after putting my application to TestFlight and letting a friend of mine test it with his phone (iOS 17.4.1, iPhone 15 Pro) it appears that sometimes when opening a file the QuickLook sheet doesn't open until the app's focus is lost. @State Button("Open file") { url = someFileUrl }.quickLookPreview($url)
2
0
416
Jun ’24
quick look configuration how to write a usdz with?
this week i was watching https://developer.apple.com/videos/play/wwdc2024/10105/ with the amazing "configuration" feature to change the color or mesh straight in quick look, but i tried a lot with goarounds but nothing bring me to success how do i write in the usda files? anytiome i overwrite the usda even with just a "{}" inside... Reality composer pro rejects the file to be open again where is the developer man in the tutorial writing the usda? how is the usda compressed in usdz? (none of the compressors i tried accepeted the modified usda file) this is the code it's suggested in the video #usda 1.0 ( defaultPrim = "iPhone" ) def Xform "iPhone" ( variants = { string Color = "Black_Titanium" } prepend variantSets = ["Color"] ) { variantSet "Color" = { "Black_Titanium" { } "Blue_Titanium" { } "Natural_Titanium" { } "White_Titanium" { } } } but i dont understand how to do it with my own files,
3
0
623
Jun ’24