QuickLook

RSS for tag

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

QuickLook Documentation

Posts under QuickLook tag

30 Posts
Sort by:
Post not yet marked as solved
0 Replies
467 Views
Hi, I’ve implemented an ARKit app that display an usdz object in the real world. In this scenario, the placement is via image recognition (Reality Composer Scene) Obviously when I don’t see the image (QR marker), the app could not detect the anchor and it will not place the object in the real world. Is it possibile to recognize an image (QR marker) and after placing the object on it, leave the object there ? So basically detect the marker place the object leave the object there, not depending on the image (marker) recognition Thanks
Posted Last updated
.
Post not yet marked as solved
0 Replies
553 Views
Hi, I watched the WWDC23 session video, "Create 3D models for Quick Look spatial experiences." https://developer.apple.com/videos/play/wwdc2023/10274/ In the video, I understood that the scale of models displayed using visionOS's AR Quick Look is determined by referencing the "metersPerUnit" value in USDZ files. I tried to find tools to set the "metersPerUnit" in 3D software or tools to view the "metersPerUnit" in USDZ files, but I couldn't find any. I believe adjusting the "metersPerUnit" in USDZ is crucial to achieve real-world scale when displaying models through visionOS's AR Quick Look. If anyone knows of apps or tools that can reference USDZ's "metersPerUnit" or 3D editor apps or tools that allow exporting with the "metersPerUnit" value properly reflected, I would greatly appreciate the information. Best regards. Sadao Tokuyama https://twitter.com/tokufxug https://www.linkedin.com/in/sadao-tokuyama/
Posted Last updated
.
Post not yet marked as solved
0 Replies
561 Views
I am using QLPreviewController with SwiftUI using UIViewControllerRepresentable. If I try to delete or insert pages of large size PDF, QLPreviewController is not calling delegate methods (didUpdateContentsOf, didSaveEditedCopyOf). struct QuickLookController: UIViewControllerRepresentable { @Environment(\.dismiss) var dismiss weak var delegate: QLPreviewControllerDelegate? weak var dataSource: QLPreviewControllerDataSource? func makeUIViewController(context: Context) -> UINavigationController { let controller = context.coordinator.controller controller.delegate = delegate controller.dataSource = dataSource controller.navigationItem.rightBarButtonItem = context.coordinator.dismissButton return UINavigationController(rootViewController: controller) } func updateUIViewController(_ viewController: UINavigationController, context: UIViewControllerRepresentableContext<QuickLookController>) { } func makeCoordinator() -> Self.Coordinator { .init(parent: self) } @MainActor class Coordinator: NSObject { var parent: QuickLookController init(parent: QuickLookController) { self.parent = parent } lazy var controller: QLPreviewController = { let controller = QLPreviewController() return controller }() lazy var dismissButton: UIBarButtonItem = { let button = UIBarButtonItem( title: NSLocalizedString("Done", comment: ""), style: .plain, target: self, action: #selector(rightButtonTapped(_:)) ) button.tag = 2 return button }() @objc func rightButtonTapped(_ sender: Any) { controller.dismiss(animated: true) } } } // MARK: QuickLook extension ViewerModel: QLPreviewControllerDataSource, QLPreviewControllerDelegate { public func numberOfPreviewItems(in controller: QLPreviewController) -> Int { 1 } public func previewController( _ controller: QLPreviewController, previewItemAt index: Int ) -> QLPreviewItem { let title = self.document .documentURL? .lastPathComponent ?? "" let url = PDFManager .directory .appendingPathComponent(title) as NSURL return url as QLPreviewItem } public func previewControllerDidDismiss(_ controller: QLPreviewController) { } public func previewControllerWillDismiss(_ controller: QLPreviewController) { } ✔️ It's same even if I set it to updateContents public func previewController(_ controller: QLPreviewController, editingModeFor previewItem: QLPreviewItem) -> QLPreviewItemEditingMode { .createCopy } ✔️ Not called with Large Size PDF public func previewController(_ controller: QLPreviewController, didUpdateContentsOf previewItem: QLPreviewItem) { } ✔️ Not called with Large Size PDF public func previewController(_ controller: QLPreviewController, didSaveEditedCopyOf previewItem: QLPreviewItem, at modifiedContentsURL: URL) { } }
Posted
by insub.
Last updated
.
Post not yet marked as solved
0 Replies
575 Views
I’ve poured over the session “Discover Quick Look for spatial computing” and I was really impressed about “Windowed Quick Look” and how items can be opened in their own Volume and stay open even if the app/website they were opened from was closed. I had an additional question–how long do items in “Windowed Quick Look” remain in the Shared Space after the app or web page they were opened from is closed? I’m imaging something like a how-to document or diagram that users could be consulting visually but not interacting with, will visionOS purge it from memory at some point or will it persist indefinitely until the user manually closes them? Same example if I was using a how-to document or diagram to help me work or learn alongside the app/site I was working or learning in, it would be more convenient if it was still open so I could continue right where I left off.

Therefore, if a user were to take off the Vision Pro for the evening and then put it back on in the morning, would the item they opened in Windowed Quick Look persist alongside the other apps/windows/volumes they had open and were working with in the Shared Space?
Posted Last updated
.
Post not yet marked as solved
0 Replies
748 Views
Just getting familiar with XCode. Using Reality Composer a lot now. Ready to try coding along with with Reality Composer. Saw this demo (see link below), but I don't want to use a web server to retrieve banner information, I would prefer to embed this information directly into the USDZ file to be read with AR Quick Look. **Two questions: ** How can you get a banner like this when you open an USDZ file and edit the banner information directly (within the file itself) without using a URL? In place of the call to action button (for Apple Pay) in the demo below, I'd like to use that button to either call a phone number, send a text, or go to a web URL. Link to Apple's example with Apple Pay (see custom examples section, like for the kids' slide example on that page). https://developer.apple.com/augmented-reality/quick-look/ Scraps are welcome, hungry to learn.
Posted Last updated
.
Post marked as solved
2 Replies
1.6k Views
I'm trying to create a custom Quick Look preview on macOS. I've found the Quick Look Preview Extension target, which is brilliant, and does most of the 'heavy' lifting, but I've run into a few problems. I'm implementing a preview for MIDI files (which has been missing since 2009...) using AVMIDIPlayer. The player keeps playing when the file is no longer selected! What's the mechanism for fixing that? Some sort of check that the view exists..? I notice that the OS preview for audio files has a different interface for the Finder's preview column and for the QuickLook 'pop-up' window. Again, I can't see how you define different views for those two environments. Is there any documentation that's specifically "Mac"? I can only find iOS stuff. (Same for third-party tutorials.)
Posted
by benwiggy.
Last updated
.
Post not yet marked as solved
0 Replies
646 Views
I'm working on a QuickLook extension for the file extension snd. This extension was used by multiple companies in the 90s most notably by Sun. https://en.wikipedia.org/wiki/Au_file_format However it was also used by companies manufacturing samplers and synthesiser. I'd like to preview files from the latter, however I was not able to make my extension run when these files are previewed. To verify my extension works I added an exported UTI with the file extension dmf which is completely owned by my app and preview and opening the files work as expected. However for the snd extension the system always uses the same preview (I assume QuickTime) and it doesn't matter if I associate my app with all files using the file extension. I'm assuming since it's impossible to tell just from the filename what kind of file this is the system just simply assumes it's a Sun file format and uses one of the first part previews, QuickTime or maybe Audio.qlgenerator. Is there any way I could override this behaviour just for this one file extension? (As a side note I guess I could try the older QLGenerator route as well, but I recall not being able to play back audio files with those APIs no matter what I tried) Any help would be welcome.
Posted
by rmridev.
Last updated
.