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

42 Posts
Sort by:
Post not yet marked as solved
1 Replies
228 Views
I have an NSImageView-based preview appex plugin for macOS in Objective-C. It's based off the sample template that you can add to an app. It completely makes it through preparePreviewOfFileAtURL, and I stuff pixel data into a CGImage, then that into an NSImage and that onto an NSImageView that is self.view from the storyboard. I can see all data via qlManager -p, since it will print error messages for caveman debugging. I have no idea and there are no docs on using the "Quick Look Simulator" which appears to do nothing. I set background color of the NSImageView.layer to red, and it shows up red. So I know the NSImageView is visible, just not the image that it also points to. About 30% of the time, only the red shows up, and the other 70% of the time nothing shows up in preview just smokey blurred version of the icons underneath in Finder. My only recourse, is to disable the extension list for the preview appex, and let the thumbnailer appex provide the preview. There are no samples of this for macOS, and the default templates aren't a working version of this either.
Posted
by Alecazam.
Last updated
.
Post not yet marked as solved
0 Replies
189 Views
i,m loading pdf in QLPreviewController, pdf has more than 5 pages, im editing pdf one by one till last page and giving print, in print preview screen its not showing proper edited pdf. seems like first two edited page showing. remaining pages are seems like not edited screen
Posted Last updated
.
Post not yet marked as solved
4 Replies
509 Views
We create reality files on Reality Composer on an iPad Pro 2020 (iPad OS 14.8.1). They can be opened in AR correctly on iOS 14 devices (our iPad & an iPhone 12 Pro). However on our iOS 15 iPhone X (iOS 15.2.1), AR Quick Look opens but it displays an error message saying “the object cannot be opened”. I have tried creating a .reality file on Reality Composer directly on my iOS 15 iPhone X (I just exported the template project for horizontal plane tracking), but the export fails to open on the very same device. However, the file generated on my iOS 15 iPhone X opens fine on my iPad Pro (iPad OS 14.8.1). USDZ files work fine on iOS though. Any lead on how to solve this issue?
Posted Last updated
.
Post not yet marked as solved
2 Replies
587 Views
Will AR Quick Look support be provided via in-app browsers on iOS 15? The most recent update of iOS 15 doesn't provide this functionality. The user sees a greyed out AR button. The Object mode works as expected, however. To replicate: Send this link (https://www.apple.com/events) to the Gmail app, or message it to yourself in Slack or Discord Open it Tap on the Apple logo
Posted Last updated
.
Post not yet marked as solved
7 Replies
1.1k Views
AR Quick View's AR Quick View button cannot be pressed on some iOS devices. As for the iPhone 12 Pro, the AR Quick View button cannot be pressed on iOS 15 when reading from the standard iOS QR code reader, but the AR Quick View button can be pressed on the iPhone 12 Pro with iOS 14. On other devices, you can press the AR Quick View button when launching from Safari, but you cannot press the AR Quick View button when accessing from the standard QR code reader. Also, on some iOS devices, the AR Quick View button cannot be pressed. The problem seems to be occurring outside of the https://konabeer.jp/beach-diorama-ar/ as well. Is there any way to avoid this AR Quick View button not being able to be pressed? It would be very helpful if I could get more information than just the solution to this problem. iPhone7(iOS13):OK iPhoneX(iOS15):QR Code Reader:NG iPhone11(iOS14):OK iPhone12Pro(iOS14):OK iPhone12Pro(iOS15):QR Code Reader:NG iPhone12(iOS15.1):QR Code Reader:NG iPad Air(iOS15):QR Code Reader:NG iPhoneSE(iOS15):QR Code Reader:NG As a result of our own verification, the AR Quick Look button is deactivated on iOS 15 and when the QR code is imported from the Control Center. If you know of any known bugs or workarounds, or if there are any informative sites that have information on this issue, I would appreciate it.
Posted Last updated
.
Post not yet marked as solved
2 Replies
340 Views
I'm seeing an issue using [UIView drawViewHierarchyInRect:afterScreenUpdates:] to take an app "screenshot". Specifically, I'm seeing that a PDF rendered using QLPreviewController doesn't render in the screenshot when the code is run on a device. I'm using this UIView API in conjunction with UIGraphicsBeginImageContextWithOptions and UIGraphicsEndImageContext - the simplified code is as follows: UIWindow *appWindow = [[[UIApplication sharedApplication] delegate] window]; UIGraphicsBeginImageContextWithOptions(imageSize, NO, 1.0); CGContextRef graphicsContext = UIGraphicsGetCurrentContext(); BOOL result = [appWindow drawViewHierarchyInRect:screenBounds afterScreenUpdates:NO]; UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); and I'm setting up my QLPreviewController as follows: - (void)pdfButtonTapped:(nonnull UIButton *)button { QLPreviewController *nextViewController = [QLPreviewController new]; nextViewController.dataSource = self; [self presentViewController:nextViewController animated:YES completion:nil]; } #pragma mark - QLPreviewControllerDataSource - (NSInteger)numberOfPreviewItemsInPreviewController:(nonnull QLPreviewController *)controller { return 1; } - (nonnull id<QLPreviewItem>)previewController:(nonnull QLPreviewController *)controller previewItemAtIndex:(NSInteger)index { return [NSBundle.mainBundle URLForResource:@"menu_web_november" withExtension:@"pdf"]; } I'm running this code on both device and simulator: Device: iPad (6th generation), iOS 15.2 [Screen 1024x768] Simulator: iPad (9th generation), iOS 15.2, Xcode 13.2.1 (13C100) [Screen 1080x810] The results I'm seeing differ between simulator and device. On device, I see that only the navigation bar is rendered into the final image: On simulator, I see that the full view (including the PDF) is rendered into the final image: On both device and simulator, the result returned from the [UIView drawViewHierarchyInRect:afterScreenUpdates:] call is YES. I'm capturing these screenshots by setting a breakpoint in the code after UIGraphicsEndImageContext(), choosing the image variable in the debug inspector and pressing the "eye" button but note that these are the results I see when running the code in release too. I have a couple of questions about these results: Is it expected that QLPreviewController contents (for PDF at least) don't render in the snaphot image on device Is it expected that QLPreviewController contents (for PDF at least) do render in the snaphot image on simulator If this behaviour is expected, is there a way of telling which UIView subclasses are "compatible" with the [UIView drawViewHierarchyInRect:afterScreenUpdates:] API and which UIView subclasses won't render their contents in a snapshot? Thanks for your help in advance, Ceri
Posted
by ceri-cba.
Last updated
.
Post not yet marked as solved
0 Replies
323 Views
Recently, I am learning some knowledge about OpenCV on Mac, refer to the online tutorial to configure OpenCV of C++ on Xcode, and implement some simple examples on Xcode. The biggest problem encountered is how to preview the image in debug mode. The cv::Mat image cannot be previewed directly, which is very unfriendly for debugging. I also found some solutions to this problem on the Internet, and these results are disappointing, at least for me as a programming beginner. I hope that this function implemented by xcode has the corresponding "OpenCV Image Viewer" plug-in on other IDEs on Mac such as Pycharm and CLion, and the "Image Watch" plug-in corresponding to Visual Studio on Windows. For me, this feature is necessary. According to this idea, is it a wrong choice to learn OpenCV C++ with Xcode, and embracing CLion on a Mac is the best choice for me? (Considering that Xcode is an IDE for Swift, I don't know much about Swift.) The process of implementing these simple examples on Xcode is still very enjoyable. I like Xcode's UI design. Therefore, I still hope that there is the best way to solve this problem in Xcode. The following is an example of running C++ OpenCV on Xcode: Xcode Version: 13.2.1 (13C100) OpenCV Version: stable 4.5.3 (bottled)
Posted
by deku_chen.
Last updated
.
Post not yet marked as solved
0 Replies
290 Views
With iOS 15 there are changes to keyboard handling. Besides usual overriding of keyCommands a programmer has to assign own commands higher priority than system commands. So, the following code works for me: final class MyViewController: UIViewController { override var keyCommands: [UIKeyCommand]? { let action = UIKeyCommand(input: UIKeyCommand.inputUpArrow, modifierFlags: [], action: #selector(myAction)) if #available(iOS 15, *) { action.wantsPriorityOverSystemBehavior = true } return [action] } // rest of the code } On the other hand, almost the same code but with inheriting from QLPreviewController doesn't work: final class PreviewViewController: QLPreviewController { // same internals as above } In view hierarchy I spotted that there is actually some kind of extra navigation, maybe that is stealing my keyboard presses, maybe that's why above code isn't working. Does anyone have an idea how to fix or workaround this issue? Obviously, the extra navigation is from Apple and I don't have access to these extra presented controllers. I was trying to print the following details, but neither helps: print(presentedViewController ?? "none") // output: none print(topMostViewController) // output: <MyApp.PreviewViewController: 0x7fbe44156203> print(inputViewController ?? "none") // output: none It's worth to add I've also tried to add method override func pressesBegan(_ presses: Set<UIPress>, with event: UIPressesEvent?) { print("test?") super.pressesBegan(presses, with: event) } And test never appears in the console, whatever button I press. So clearly something else steals the key presses. This did not happen before iOS 15. I conclude it, thinking it may be a bug in the API. Probably just no one thought of this scenario when adding the new keys..?
Posted Last updated
.
Post not yet marked as solved
2 Replies
457 Views
Hi together, I am developing a document viewer for a specific API. I download the relevant files to a custom directory and open them using a QLPreviewController in SwiftUI. I built this with a UIViewControllerRepresentable. Everything is working fine except the saving of modified files using the pencil markup in the preview. Here is the error: https://pastebin.com/TRnfduE5 This is how my controller looks like: struct PreviewController: UIViewControllerRepresentable {     let url: URL     @Binding var isPresented: Bool          func makeUIViewController(context: Context) -> UINavigationController {         let controller = QLPreviewController()         controller.dataSource = context.coordinator         controller.navigationItem.leftBarButtonItem = UIBarButtonItem(                     barButtonSystemItem: .done, target: context.coordinator,                     action: #selector(context.coordinator.dismiss)                 )                  let navigationController = UINavigationController(rootViewController: controller)         return navigationController     }          func makeCoordinator() -> Coordinator {         return Coordinator(parent: self)     }          func updateUIViewController(_ uiViewController: UINavigationController, context: Context) {             let controller = QLPreviewController()             controller.dataSource = context.coordinator         }          class Coordinator: QLPreviewControllerDataSource {                  let parent: PreviewController                  init(parent: PreviewController) {             self.parent = parent         }                  @objc func dismiss() {             parent.isPresented = false         }                  func numberOfPreviewItems(             in controller: QLPreviewController         ) -> Int {             return 1         }                  func previewController(             _ controller: QLPreviewController, previewItemAt index: Int         ) -> QLPreviewItem {             return parent.url as QLPreviewItem         }                  func previewController(_ controller: QLPreviewController, editingModeFor previewItem: QLPreviewItem         ) -> QLPreviewItemEditingMode {             .createCopy         }                  func previewController(_: QLPreviewController, didUpdateContentsOf: QLPreviewItem){             print("Updated.")         }                  func previewController(_: QLPreviewController, didSaveEditedCopyOf: QLPreviewItem, at: URL) {             print("Saved: " + at.path)         }              } } Does anyone know, what the problem is here? And I made another experience: as you see there, I'm currently only logging the output / actions - and there isn't anything being logged, if I made just one edit. It only throws the error above after the 1st edit - so if I edit sth again and tap done or the pencil icon again... Is this ok so? Thanks for any help or advise!
Posted Last updated
.
Post not yet marked as solved
0 Replies
523 Views
I want to debug my QuickLook extension for macOS. I read somewhere online that when running it in Xcode, I have to select Quick Look Simulator, but I have no idea what to do after that, and I couldn't find any official documentation.
Posted
by Nickkk.
Last updated
.
Post not yet marked as solved
0 Replies
246 Views
Hello, I am trying to use app groups to share preferences between an app and its QuickLook extension (both sandboxed), but I can't understand why it's not working. For testing, I created an empty macOS app project and added a QuickLook Extension, then on both the targets' entitlement files I added the app group domain in the form "teamid.test". Last but not least, in the Info.plist file of the QL extension i added some UTIs to have the QL extension called when previewing. In the QL extension's PreviewViewController.swift file I try to save a value like this: func preparePreviewOfFile(at url: URL, completionHandler handler: @escaping (Error?) -> Void) { let defaults=UserDefaults(suiteName: "teamid.***") defaults?.set(1, forKey: "test") handler(nil) } If I try to run the app and preview a file though, I get this message in the Console: Couldn't write values for keys ( test ) in CFPrefsPlistSource<0x7fb63681cce0> (Domain: teamid.***, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: Yes): setting preferences outside an application's container requires user-preference-write or file-write-data sandbox access And the value is not saved. The only way to make this work is to add a temporary exception in the extension target, like this: <array> <string>/Library/Group Containers/teamid.***/</string> </array> </plist> What bugs me is that if I try to save a value from the app instead, it works. Are app groups not supported for QuickLook extensions? Thank you, Michele
Posted
by MicDG.
Last updated
.
Post not yet marked as solved
3 Replies
747 Views
Is it possible to write to an App Group's Container folder or UserDefaults from an iOS Thumbnail Extension or QuickLook Extension? It doesn't work. It does work for a Widget extension. I've added the App Group to the Entitlements of each extension. For writing a file to App Group Container I get Error Domain=NSCocoaErrorDomain Code=513 "Du hast nicht die Zugriffsrechte, um die Datei „quicklook 01 current.log“ im Ordner „DocumentInvestigation“ zu sichern." UserInfo={NSFilePath=/private/var/mobile/Containers/Shared/AppGroup/<redacted: the container UUID>/DocumentInvestigation/quicklook 01 current.log, NSUnderlyingError=0x28090bb10 {Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"}} For setting App Group UserDefaults [User Defaults] Couldn't write values for keys ( &#9;&#9;example ) in CFPrefsPlistSource<0x2839cc700> (Domain: <redacted: the-group-identifier>, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No): setting preferences outside an application's container requires user-preference-write or file-write-data sandbox access The use case is, that we are investigating an issue and would like to log to a file which we then can have customers send us.
Posted
by hannesoid.
Last updated
.
Post not yet marked as solved
1 Replies
535 Views
Hi, I'm trying to write a Quick Look extension for my iOS app. However, I'm having issues initializing AVAudioEngine in my QLPreviewingController subclass from preparePreviewOfFile. The following error messages are printed to the console after attempting to initialize AVAudioEngine, and the Quick Look Extension crashes with EXC_BAD_ACCESS. The same code works fine within the main iOS app. It also works on macOS inside a Catalyst app on the macOS Monterey RC when previewing a file in the Finder. I've also filed feedback with feedback number FB9713048. Thanks for taking a look at this. Console output: [audiocomp] AudioComponentPluginMgr.mm:545 reg server remote proxy error Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.audio.AudioComponentRegistrar was invalidated: failed at lookup with error 159 - Sandbox restriction." UserInfo={NSDebugDescription=The connection to service named com.apple.audio.AudioComponentRegistrar was invalidated: failed at lookup with error 159 - Sandbox restriction.} [as] AudioSessionClientManager.cpp:475 Couldn't connect to com.apple.audio.AudioSession Error: 1100; AudioSession will not be usable [aurioc] AURemoteIO.cpp:148 Couldn't connect to com.apple.audio.AURemoteIOServer; AURemoteIO will not be usable [aurioc] AURemoteIO.cpp:148 Couldn't connect to com.apple.audio.AURemoteIOServer; AURemoteIO will not be usable [default] AURemoteIO is passing a serverPID of 0 to CheckRPCError! [default] CheckRPCError: AURemoteIO returned server mach error 0x10000003! [aurioc] AURemoteIO.cpp:148 Couldn't connect to com.apple.audio.AURemoteIOServer; AURemoteIO will not be usable [aurioc] AURemoteIO.cpp:148 Couldn't connect to com.apple.audio.AURemoteIOServer; AURemoteIO will not be usable [default] AURemoteIO is passing a serverPID of 0 to CheckRPCError! [default] CheckRPCError: AURemoteIO returned server mach error 0x10000003! [aurioc] AURemoteIO.cpp:148 Couldn't connect to com.apple.audio.AURemoteIOServer; AURemoteIO will not be usable [aurioc] AURemoteIO.cpp:148 Couldn't connect to com.apple.audio.AURemoteIOServer; AURemoteIO will not be usable [default] AURemoteIO is passing a serverPID of 0 to CheckRPCError! [default] CheckRPCError: AURemoteIO returned server mach error 0x10000003! [aurioc] AURemoteIO.cpp:148 Couldn't connect to com.apple.audio.AURemoteIOServer; AURemoteIO will not be usable [aurioc] AURemoteIO.cpp:148 Couldn't connect to com.apple.audio.AURemoteIOServer; AURemoteIO will not be usable [default] GetProperty is passing a serverPID of 0 to CheckRPCError! [default] CheckRPCError: GetProperty returned server mach error 0x10000003! [aurioc] AURemoteIO.cpp:148 Couldn't connect to com.apple.audio.AURemoteIOServer; AURemoteIO will not be usable [aurioc] AURemoteIO.cpp:148 Couldn't connect to com.apple.audio.AURemoteIOServer; AURemoteIO will not be usable [default] SetProperty is passing a serverPID of 0 to CheckRPCError! [default] CheckRPCError: SetProperty returned server mach error 0x10000003! [aurioc] AURemoteIO.cpp:148 Couldn't connect to com.apple.audio.AURemoteIOServer; AURemoteIO will not be usable [aurioc] AURemoteIO.cpp:148 Couldn't connect to com.apple.audio.AURemoteIOServer; AURemoteIO will not be usable [default] Initialize is passing a serverPID of 0 to CheckRPCError! [default] CheckRPCError: Initialize returned server mach error 0x10000003! [aurioc] AURemoteIO.cpp:1123 failed: 268435459 (enable 2, outf< 2 ch, 0 Hz, Float32, deinterleaved> inf< 2 ch, 0 Hz, Float32, deinterleaved>) throwing -10878 throwing -10878 throwing -10878 throwing -10878 throwing -10878 throwing -10878 throwing -10878 throwing -10878 throwing -10878 [aurioc] AURemoteIO.cpp:148 Couldn't connect to com.apple.audio.AURemoteIOServer; AURemoteIO will not be usable [aurioc] AURemoteIO.cpp:148 Couldn't connect to com.apple.audio.AURemoteIOServer; AURemoteIO will not be usable [default] SetProperty is passing a serverPID of 0 to CheckRPCError! [default] CheckRPCError: SetProperty returned server mach error 0x10000003! [aurioc] AURemoteIO.cpp:148 Couldn't connect to com.apple.audio.AURemoteIOServer; AURemoteIO will not be usable [aurioc] AURemoteIO.cpp:148 Couldn't connect to com.apple.audio.AURemoteIOServer; AURemoteIO will not be usable [default] Initialize is passing a serverPID of 0 to CheckRPCError! [default] CheckRPCError: Initialize returned server mach error 0x10000003! [aurioc] AURemoteIO.cpp:1123 failed: 268435459 (enable 2, outf< 2 ch, 44100 Hz, Float32, deinterleaved> inf< 2 ch, 0 Hz, Float32, deinterleaved>) [avae] AVAEInternal.h:109 [AVAudioEngineGraph.mm:1344:Initialize: (err = PerformCommand(*outputNode, kAUInitialize, NULL, 0)): error 268435459 [avae] AVAudioEngine.mm:167 Engine@0x2830594d0: could not initialize, error = 268435459 [aurioc] AURemoteIO.cpp:148 Couldn't connect to com.apple.audio.AURemoteIOServer; AURemoteIO will not be usable [aurioc] AURemoteIO.cpp:148 Couldn't connect to com.apple.audio.AURemoteIOServer; AURemoteIO will not be usable [default] SetProperty is passing a serverPID of 0 to CheckRPCError! [default] CheckRPCError: SetProperty returned server mach error 0x10000003! [aurioc] AURemoteIO.cpp:148 Couldn't connect to com.apple.audio.AURemoteIOServer; AURemoteIO will not be usable [aurioc] AURemoteIO.cpp:148 Couldn't connect to com.apple.audio.AURemoteIOServer; AURemoteIO will not be usable [default] Initialize is passing a serverPID of 0 to CheckRPCError! [default] CheckRPCError: Initialize returned server mach error 0x10000003! [aurioc] AURemoteIO.cpp:1123 failed: 268435459 (enable 2, outf< 2 ch, 44100 Hz, Float32, deinterleaved> inf< 2 ch, 0 Hz, Float32, deinterleaved>) [avae] AVAEInternal.h:109 [AVAudioEngineGraph.mm:1344:Initialize: (err = PerformCommand(*outputNode, kAUInitialize, NULL, 0)): error 268435459 [avae] AVAudioEngineGraph.mm:4631 Can't retrieve source node to play sequence because there is no output node! [aurioc] AURemoteIO.cpp:148 Couldn't connect to com.apple.audio.AURemoteIOServer; AURemoteIO will not be usable [aurioc] AURemoteIO.cpp:148 Couldn't connect to com.apple.audio.AURemoteIOServer; AURemoteIO will not be usable [default] GetProperty is passing a serverPID of 0 to CheckRPCError! [default] CheckRPCError: GetProperty returned server mach error 0x10000003! (lldb)
Posted Last updated
.
Post not yet marked as solved
0 Replies
549 Views
Hi I am trying to display a USDZ model in my app using code similar to that described here: https://developer.apple.com/documentation/arkit/previewing_a_model_with_ar_quick_look however, after updating to iOS 15 and Xcode 13 the option to toggle between the base model view and the AR view is no longer there, the share button is also missing. I am using view inside a navigation view in SwiftUI with code as follows. import SwiftUI struct ModelView: View {   var body: some View {     ARQuickLookView()   } } struct ModelView_Previews: PreviewProvider {   static var previews: some View {     ModelView()   } } import SwiftUI import QuickLook import ARKit struct ARQuickLookView: UIViewControllerRepresentable {   var allowScaling: Bool = true       func makeCoordinator() -> ARQuickLookView.Coordinator {     Coordinator(self)   }       func makeUIViewController(context: Context) -> QLPreviewController {     let controller = QLPreviewController()     controller.dataSource = context.coordinator     return controller   }       func updateUIViewController(_ controller: QLPreviewController,                 context: Context) {     // nothing to do here   }       class Coordinator: NSObject, QLPreviewControllerDataSource {     let parent: ARQuickLookView           init(_ parent: ARQuickLookView) {       self.parent = parent       super.init()     }           func numberOfPreviewItems(in controller: QLPreviewController) -> Int {       return 1     }           func previewController(      _ controller: QLPreviewController,      previewItemAt index: Int) -> QLPreviewItem {       let url = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0].appendingPathComponent("model.usdz")       return url as QLPreviewItem     }         } } struct ARQuickLookView_Previews: PreviewProvider {   static var previews: some View {     ARQuickLookView()   } } Any info on why I don't have these options and how I could get them back would be appreciated. Thanks Louis
Posted Last updated
.
Post marked as solved
2 Replies
531 Views
Hi all, this is my first time trying to add an AR preview into an app (also my first time using the file system). I have been trying to implement a solution similar to that explained here https://developer.apple.com/forums/thread/126377 however one key difference is that my usdz model is not in my main bundle as it is generated and downloaded from an external source at run time. I was wondering if it is possible to display a file stored in the apps documents or cache directory and how it is done. The file is downloaded and stored in the caches directory as follows: class ModelFetcher: NSObject{   var modelUrl: URL?       func generateModel() {     guard let url = URL(string: "http://127.0.0.1:5000/model.usdz") else {return}     let urlSession = URLSession(configuration: .default, delegate: self, delegateQueue: OperationQueue())     var request = URLRequest(url: url)     request.httpMethod = "POST"     let downloadTask = urlSession.downloadTask(with: request)     downloadTask.resume()   } } extension ModelFetcher: URLSessionDownloadDelegate {   func urlSession(_ session: URLSession, downloadTask: URLSessionDownloadTask, didFinishDownloadingTo location: URL) {     print("File Downloaded Location- ", location)           guard let url = downloadTask.originalRequest?.url else {       return     }     let docsPath = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask)[0]     let destinationPath = docsPath.appendingPathComponent(url.lastPathComponent)           try? FileManager.default.removeItem(at: destinationPath)           do {       try FileManager.default.copyItem(at: location, to: destinationPath)       self.modelUrl = destinationPath       print("File moved to: \(modelUrl?.absoluteURL)")     } catch let error {       print("Copy Error: \(error.localizedDescription)")     }   } } and then the quick look preview looks like this: import SwiftUI import QuickLook import ARKit struct ARQuickLookView: UIViewControllerRepresentable {   var allowScaling: Bool = true       func makeCoordinator() -> ARQuickLookView.Coordinator {     Coordinator(self)   }       func makeUIViewController(context: Context) -> QLPreviewController {     let controller = QLPreviewController()     controller.dataSource = context.coordinator     return controller   }       func updateUIViewController(_ controller: QLPreviewController,                 context: Context) {     // nothing to do here   }       class Coordinator: NSObject, QLPreviewControllerDataSource {     let parent: ARQuickLookView     let destinationPath = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask)[0].appendingPathComponent("model.usdz")     private lazy var fileURL: URL = destinationPath           init(_ parent: ARQuickLookView) {       self.parent = parent       super.init()     }           func numberOfPreviewItems(in controller: QLPreviewController) -> Int {       return 1     }     func previewController(       _ controller: QLPreviewController,       previewItemAt index: Int     ) -> QLPreviewItem {       let fileURL = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask)[0].appendingPathComponent("model.usdz")       print(fileURL)       let item = ARQuickLookPreviewItem(fileAt: fileURL)       print(item)       item.allowsContentScaling = parent.allowScaling       return item     }   } } struct ARQuickLookView_Previews: PreviewProvider {   static var previews: some View {     ARQuickLookView()   } } However, I get an error reading "Unhandled item type 13: contentType is: (null) #PreviewItem" I know the file is actually located at this location as I have opened it in Finder. Any help would be much appreciated. Thanks in advance, Louis
Posted Last updated
.
Post not yet marked as solved
0 Replies
342 Views
https://itunes.apple.com/lookup?bundleId=com.xxxx.xxxx while check this url in POST method then the version will shows updated version but when I check in GET method then it shows previous version.
Posted
by 1Naveen.
Last updated
.
Post not yet marked as solved
0 Replies
277 Views
Hello Guys, Have you tested requireManagedPasteboard key with your iOS beta, I have tested this successfully (On iOS 15 Beta 5 (iPhone 12)) but the still I am able to copy from Managed App quicklook (document preview) and paste to Unmanaged app. Can you please test it out and confirm your experiences please. Thanks Siva
Posted
by Subbzz.
Last updated
.
Post not yet marked as solved
1 Replies
498 Views
I have a custom QLPreviewingController with a NSScrollView. When I click with the mouse anywhere inside the ql preview view I can drag the window. This prevent to drag the scrollbar. The problem exists only on big sur with custom quicklook appex.
Posted
by sbcisa.
Last updated
.
Post not yet marked as solved
0 Replies
393 Views
I have an app on the Mac App Store (so sandboxed) that includes a QuickLook Preview Extension that targets Markdown files. It works just. But I'm in the process of updating it so that it displays inline images as well as styled text. However, despite setting Downloads read-only access permission (and user-selected, though I know that shouldn't be required: no open/save dialogs here) in the extension's entitlements, Sandbox refuses too allow access to the test image: I always get a deny(1) file-read-data error in the log. FWIW, the test file is referenced in the source Markdown as an absolute path. I've tried different signings and no joy. I’ve tried placing the referenced image in various other locations. Also no joy. Question is, is this just something QuickLook extensions cannot do from within the sandbox, or am I missing something? Is there anything extra I can do to debug this?
Posted Last updated
.