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

154 Posts

Post

Replies

Boosts

Views

Activity

QuickLook Extension and App Groups on macOS
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
0
2
807
Nov ’21
Can I write to an App Group from an iOS Thumbnail Extension or QuickLook Extension?
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.
3
0
1.9k
Nov ’21
AVAudioEngine crashes Quick Look Preview Extension on iOS 15
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)
1
0
1.7k
Nov ’21
USDZ Preview missing AR option after iOS 15
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
2
0
1.1k
Nov ’21
Display AR QuickLook preview of usdz model not in main bundle
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
2
0
1.5k
Sep ’21
iOS requireManagedPasteboard
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
0
0
490
Aug ’21
App Sandbox and QuickLook Preview Extension file loading
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?
0
0
1k
Jul ’21
WKWebView and QuickLook Issues Previewing iWork Files
Hello, I've been having some issues getting WKWebView or QuickLook rendering a preview of files with iWork type extensions (.pages, .numbers, .key) At first, I thought it was the contentType (or media type) not being set correctly, but I'm almost positive the correct one is application/vnd.apple.pages. I've seen older posts that reference the contentType as .pages.zip as iWork files at some point in time were directories, but it's my understanding that is no longer the case. I've tried the following media types application/zip, application/pdf, application/vnd.apple.pages and the default application/octet-stream see this doc for application/vnd.apple.pages confirmation.  iana.org/assignments/media-types/media-types.xhtml I tried to just use QuickLook thinking this framework would solve all my problems. Well, the result is better in the respect that QuickLook doesn't default to showing the file encoding when a preview can't be shown. But the file preview is still missing. See these basic implementations of WKWebView and QuickLook. Note: Target iOS 13.6 All iWork Apps are updated Assume files haven't been tampered with Storyboard wkwebview Pages_test.pages file is added into project and is in the correct target No protocol methods implemented WKWebView WKWebView class ViewController: UIViewController, WKUIDelegate, WKNavigationDelegate { @IBOutlet weak var webView:WKWebView! override func viewDidLoad() { &#9;&#9;super.viewDidLoad() &#9;&#9; &#9;&#9;webView.uiDelegate = self &#9;&#9;webView.navigationDelegate = self &#9;&#9; &#9;&#9;let url = Bundle.main.url(forResource: "pages_test", withExtension: "pages")! &#9;&#9; &#9;&#9;var data:Data? &#9;&#9;do { &#9;&#9;&#9;&#9;try data = Data(contentsOf: url) &#9;&#9;} catch { &#9;&#9;&#9;&#9;fatalError("Error fetching data") &#9;&#9;} &#9;&#9; &#9;&#9;webView.load(data!, mimeType: "application/vnd.apple.pages", characterEncodingName: "", baseURL: url.deletingLastPathComponent()) } QuickLook class ViewController: UIViewController {   var previewView:QLPreviewController!       override func viewDidLoad() {     super.viewDidLoad()     setUpQuickLookPreview()   }       override func viewDidAppear(_ animated: Bool) {     super.viewDidAppear(animated)     showQuickLookPreview()   }       func setUpQuickLookPreview(){     previewView = QLPreviewController()     previewView.dataSource = self     previewView.delegate = self     previewView.currentPreviewItemIndex = 0   }       func showQuickLookPreview(){     present(previewView, animated: true, completion: nil)   } } extension ViewController: QLPreviewControllerDataSource, QLPreviewControllerDelegate {   func numberOfPreviewItems(in controller: QLPreviewController) -> Int {     return 1   }       func previewController(_ controller: QLPreviewController, previewItemAt index: Int) -> QLPreviewItem {     let url = Bundle.main.url(forResource: "pages_test", withExtension: "pages")!     return url as QLPreviewItem   } }    
1
0
1.7k
Jul ’21
Dose AR quick look support Mask Material?
Hey! Dose AR quick look support Mask Material? I have seen the the face tracking have face Mask out, which the face will create occlusion for the face. So the object like helmet wont look like just floating over the head. Now I wanted to take that mask material and apply to my other project, like world tracking and image tracking, is this possible? thanks.
0
0
871
Jul ’21
New Quick look not call extension
Testing QL extensions (thumbnail and preview) that I created base on this video. https://developer.apple.com/videos/play/wwdc2019/719 use command like sudo qlmanage -p /path/ELEVATOR.fs -c xxx.xxxxx.xxxxxx.fs -g /path/Preview.appex or sudo qlmanage -t /path/ELEVATOR.fs -c xxx.xxxxx.xxxxxx.fs -g /path/Preview.appex It give me error like this 2021-07-01 13:44:07.991 qlmanage[2278:64986] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0xa107, name = 'com.apple.coredrag' See /usr/include/servers/bootstrap_defs.h for the error codes. 2021-07-01 13:44:08.005 qlmanage[2278:64986] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x8617, name = 'com.apple.tsm.portname' See /usr/include/servers/bootstrap_defs.h for the error codes. not call thumbnail or preview extension
0
2
806
Jul ’21
How to use Quick Look Simulator to debug Quick Look extension?
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.
Replies
0
Boosts
4
Views
2.0k
Activity
Nov ’21
QuickLook Extension and App Groups on macOS
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
Replies
0
Boosts
2
Views
807
Activity
Nov ’21
Can I write to an App Group from an iOS Thumbnail Extension or QuickLook Extension?
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.
Replies
3
Boosts
0
Views
1.9k
Activity
Nov ’21
AVAudioEngine crashes Quick Look Preview Extension on iOS 15
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)
Replies
1
Boosts
0
Views
1.7k
Activity
Nov ’21
USDZ Preview missing AR option after iOS 15
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
Replies
2
Boosts
0
Views
1.1k
Activity
Nov ’21
Display AR QuickLook preview of usdz model not in main bundle
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
Replies
2
Boosts
0
Views
1.5k
Activity
Sep ’21
iTunes lookup api error
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.
Replies
0
Boosts
0
Views
682
Activity
Aug ’21
iOS requireManagedPasteboard
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
Replies
0
Boosts
0
Views
490
Activity
Aug ’21
quicklook appex scrollbar on bigsur
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.
Replies
1
Boosts
0
Views
944
Activity
Jul ’21
App Sandbox and QuickLook Preview Extension file loading
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?
Replies
0
Boosts
0
Views
1k
Activity
Jul ’21
WKWebView and QuickLook Issues Previewing iWork Files
Hello, I've been having some issues getting WKWebView or QuickLook rendering a preview of files with iWork type extensions (.pages, .numbers, .key) At first, I thought it was the contentType (or media type) not being set correctly, but I'm almost positive the correct one is application/vnd.apple.pages. I've seen older posts that reference the contentType as .pages.zip as iWork files at some point in time were directories, but it's my understanding that is no longer the case. I've tried the following media types application/zip, application/pdf, application/vnd.apple.pages and the default application/octet-stream see this doc for application/vnd.apple.pages confirmation.  iana.org/assignments/media-types/media-types.xhtml I tried to just use QuickLook thinking this framework would solve all my problems. Well, the result is better in the respect that QuickLook doesn't default to showing the file encoding when a preview can't be shown. But the file preview is still missing. See these basic implementations of WKWebView and QuickLook. Note: Target iOS 13.6 All iWork Apps are updated Assume files haven't been tampered with Storyboard wkwebview Pages_test.pages file is added into project and is in the correct target No protocol methods implemented WKWebView WKWebView class ViewController: UIViewController, WKUIDelegate, WKNavigationDelegate { @IBOutlet weak var webView:WKWebView! override func viewDidLoad() { &#9;&#9;super.viewDidLoad() &#9;&#9; &#9;&#9;webView.uiDelegate = self &#9;&#9;webView.navigationDelegate = self &#9;&#9; &#9;&#9;let url = Bundle.main.url(forResource: "pages_test", withExtension: "pages")! &#9;&#9; &#9;&#9;var data:Data? &#9;&#9;do { &#9;&#9;&#9;&#9;try data = Data(contentsOf: url) &#9;&#9;} catch { &#9;&#9;&#9;&#9;fatalError("Error fetching data") &#9;&#9;} &#9;&#9; &#9;&#9;webView.load(data!, mimeType: "application/vnd.apple.pages", characterEncodingName: "", baseURL: url.deletingLastPathComponent()) } QuickLook class ViewController: UIViewController {   var previewView:QLPreviewController!       override func viewDidLoad() {     super.viewDidLoad()     setUpQuickLookPreview()   }       override func viewDidAppear(_ animated: Bool) {     super.viewDidAppear(animated)     showQuickLookPreview()   }       func setUpQuickLookPreview(){     previewView = QLPreviewController()     previewView.dataSource = self     previewView.delegate = self     previewView.currentPreviewItemIndex = 0   }       func showQuickLookPreview(){     present(previewView, animated: true, completion: nil)   } } extension ViewController: QLPreviewControllerDataSource, QLPreviewControllerDelegate {   func numberOfPreviewItems(in controller: QLPreviewController) -> Int {     return 1   }       func previewController(_ controller: QLPreviewController, previewItemAt index: Int) -> QLPreviewItem {     let url = Bundle.main.url(forResource: "pages_test", withExtension: "pages")!     return url as QLPreviewItem   } }    
Replies
1
Boosts
0
Views
1.7k
Activity
Jul ’21
Dose AR quick look support Mask Material?
Hey! Dose AR quick look support Mask Material? I have seen the the face tracking have face Mask out, which the face will create occlusion for the face. So the object like helmet wont look like just floating over the head. Now I wanted to take that mask material and apply to my other project, like world tracking and image tracking, is this possible? thanks.
Replies
0
Boosts
0
Views
871
Activity
Jul ’21
New Quick look not call extension
Testing QL extensions (thumbnail and preview) that I created base on this video. https://developer.apple.com/videos/play/wwdc2019/719 use command like sudo qlmanage -p /path/ELEVATOR.fs -c xxx.xxxxx.xxxxxx.fs -g /path/Preview.appex or sudo qlmanage -t /path/ELEVATOR.fs -c xxx.xxxxx.xxxxxx.fs -g /path/Preview.appex It give me error like this 2021-07-01 13:44:07.991 qlmanage[2278:64986] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0xa107, name = 'com.apple.coredrag' See /usr/include/servers/bootstrap_defs.h for the error codes. 2021-07-01 13:44:08.005 qlmanage[2278:64986] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x8617, name = 'com.apple.tsm.portname' See /usr/include/servers/bootstrap_defs.h for the error codes. not call thumbnail or preview extension
Replies
0
Boosts
2
Views
806
Activity
Jul ’21
Disable instant AR placement in AR quick look
I want to disable the instant scan and placement in AR quick look and implement tap/touch to place an object. Can the instant object placement in AR quick look, be disabled?
Replies
0
Boosts
0
Views
996
Activity
Jun ’21