2015-02-04 10 views
5

के तहत मेरी Quicklook प्लगइन डीबग नहीं कर सकता मैं ऐप बंडलों का पूर्वावलोकन करने के लिए एक Quicklook प्लगइन लिख रहा हूँ। जब मैं इसे एक्सकोड 6.1 (योसमेट पर) के तहत डीबग करने का प्रयास करता हूं, तो मैं इसे काम नहीं कर सकता। 'Quicklookd' की शुरूआत और गोदी में खुला रहता है, लेकिन यह किसी भी पूर्वावलोकन प्रदर्शित नहीं होता है और मैं कंसोल में इस आउटपुट प्राप्त: यदि मैं (स्पेस बार दबाने) यह ठीक काम करता है खोजकर्ता के माध्यम से परीक्षणएक्सकोड

Testing Quick Look preview with files: 
    /Applications/Font Book.app 
[DEBUG] Preview test for file:///Applications/Font%20Book.app/. Content type UTI: com.apple.application-bundle 
[DEBUG] Previewing file:///Applications/Font%20Book.app. Content type UTI: com.apple.application-bundle. Generator used: <QLGenerator /Users/imac/Library/QuickLook/TestPlugin.qlgenerator> 
[DEBUG] Loading <QLGenerator /Users/imac/Library/QuickLook/TestPlugin.qlgenerator> 
[DEBUG] Previewing file:///Applications/Font%20Book.app finished 
2015-02-04 10:59:35.188 qlmanage[1664:138646] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x9103, name = 'com.apple.CFPasteboardClient' 
See /usr/include/servers/bootstrap_defs.h for the error codes. 
2015-02-04 10:59:35.188 qlmanage[1664:138646] Failed to allocate communication port for com.apple.CFPasteboardClient; this is likely due to sandbox restrictions 
Feb 4 10:59:50 iMac.local qlmanage[1664] <Warning>: void CGSUpdateManager::log() const: conn 0x23823 token 0x1ffffffffffe85 
Feb 4 10:59:50 iMac.local qlmanage[1664] <Warning>: Backtrace (at 6350.6): 
Feb 4 10:59:50 iMac.local qlmanage[1664] <Warning>: void CGSUpdateManager::log() const: 0 CoreGraphics      0x00007fff894a9588 CGSBacktraceCreate + 112 
Feb 4 10:59:50 iMac.local qlmanage[1664] <Warning>: void CGSUpdateManager::log() const: 1 CoreGraphics      0x00007fff894c7940 _ZN16CGSUpdateManager14disable_updateEv + 86 
Feb 4 10:59:50 iMac.local qlmanage[1664] <Warning>: void CGSUpdateManager::log() const: 2 AppKit        0x00007fff90f0aa25 -[NSWindow disableScreenUpdatesUntilFlush] + 127 
Feb 4 10:59:50 iMac.local qlmanage[1664] <Warning>: void CGSUpdateManager::log() const: 3 AppKit        0x00007fff91442e75 -[NSVisualEffectView _createOrUpdateBackdrop:view:vibrancyEffect:] + 823 
Feb 4 10:59:50 iMac.local qlmanage[1664] <Warning>: void CGSUpdateManager::log() const: 4 AppKit        0x00007fff91443b92 -[NSVisualEffectView _updateCGSWindowBackdrop] + 70 
Feb 4 10:59:50 iMac.local qlmanage[1664] <Warning>: void CGSUpdateManager::log() const: 5 AppKit        0x00007fff91447874 -[NSVisualEffectView _update] + 147 
Feb 4 10:59:50 iMac.local qlmanage[1664] <Warning>: void CGSUpdateManager::log() const: 6 AppKit        0x00007fff914475a1 -[NSVisualEffectView layout] + 59 
Feb 4 10:59:50 iMac.local qlmanage[1664] <Warning>: void CGSUpdateManager::log() const: 7 AppKit        0x00007fff90eeca64 -[NSView _layoutSubtreeWithOldSize:] + 373 
Feb 4 10:59:50 iMac.local qlmanage[1664] <Warning>: void CGSUpdateManager::log() const: 8 AppKit        0x00007fff90eeccb5 -[NSView _layoutSubtreeWithOldSize:] + 966 
Feb 4 10:59:50 iMac.local qlmanage[1664] <Warning>: void CGSUpdateManager::log() const: 9 AppKit        0x00007fff90ee04a0 -[NSView layoutSubtreeIfNeeded] + 885 
Feb 4 10:59:50 iMac.local qlmanage[1664] <Warning>: void CGSUpdateManager::log() const: 10 AppKit        0x00007fff9155ff0a _NSViewLayoutSubtreesThatUseAutolayoutIfNeeded + 71 
Feb 4 10:59:50 iMac.local qlmanage[1664] <Warning>: void CGSUpdateManager::log() const: 11 AppKit        0x00007fff90f4181f -[NSWindow(NSConstraintBasedLayout) _layoutViewTree] + 82 
Feb 4 10:59:50 iMac.local qlmanage[1664] <Warning>: void CGSUpdateManager::log() const: 12 AppKit        0x00007fff90f711b9 -[NSWindow(NSConstraintBasedLayout) layoutIfNeeded] + 244 
Feb 4 10:59:50 iMac.local qlmanage[1664] <Warning>: void CGSUpdateManager::log() const: 13 AppKit        0x00007fff90fad1de _handleWindowNeedsDisplayOrLayoutOrUpdateConstraints + 612 
Feb 4 10:59:50 iMac.local qlmanage[1664] <Warning>: void CGSUpdateManager::log() const: 14 AppKit        0x00007fff915760e1 __83-[NSWindow _postWindowNeedsDisplayOrLayoutOrUpdateConstraintsUnlessPostingDisabled]_block_invoke1531 + 46 
Feb 4 10:59:50 iMac.local qlmanage[1664] <Warning>: void CGSUpdateManager::log() const: 15 CoreFoundation      0x00007fff8b97bda7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23 
Feb 4 10:59:50 iMac.local qlmanage[1664] <Warning>: void CGSUpdateManager::log() const: 16 CoreFoundation      0x00007fff8b97bd00 __CFRunLoopDoObservers + 368 
Feb 4 10:59:50 iMac.local qlmanage[1664] <Warning>: void CGSUpdateManager::log() const: 17 CoreFoundation      0x00007fff8b96de08 __CFRunLoopRun + 872 
Feb 4 10:59:50 iMac.local qlmanage[1664] <Warning>: void CGSUpdateManager::log() const: 18 CoreFoundation      0x00007fff8b96d858 CFRunLoopRunSpecific + 296 
Feb 4 10:59:50 iMac.local qlmanage[1664] <Warning>: void CGSUpdateManager::log() const: 19 QuickLookUI       0x00007fff93acb8d2 -[QLPreviewView _startTimeOut] + 189 
Feb 4 10:59:50 iMac.local qlmanage[1664] <Warning>: void CGSUpdateManager::log() const: 20 QuickLookUI       0x00007fff93aae35e -[QLPreviewPanelController _setCurrentPreviewItem:withTransition:blocking:] + 289 
Feb 4 10:59:50 iMac.local qlmanage[1664] <Warning>: void CGSUpdateManager::log() const: 21 QuickLookUI       0x00007fff93aada93 -[QLPreviewPanelController _refreshLayoutAndContentBlocking:] + 250 
Feb 4 10:59:50 iMac.local qlmanage[1664] <Warning>: void CGSUpdateManager::log() const: 22 QuickLookUI       0x00007fff93aaf139 -[QLPreviewPanelController willOpen] + 734 
Feb 4 10:59:50 iMac.local qlmanage[1664] <Warning>: void CGSUpdateManager::log() const: 23 QuickLookUI       0x00007fff93aa5d04 -[QLPreviewPanel _openWithEffect:willOpen:toFullscreen:] + 897 
Feb 4 10:59:50 iMac.local qlmanage[1664] <Warning>: void CGSUpdateManager::log() const: 24 qlmanage       0x0000000107b11e46 qlmanage + 155206 
Feb 4 10:59:50 iMac.local qlmanage[1664] <Warning>: void CGSUpdateManager::log() const: 25 qlmanage       0x0000000107af14af qlmanage + 21679 
Feb 4 10:59:50 iMac.local qlmanage[1664] <Warning>: void CGSUpdateManager::log() const: 26 libdyld.dylib      0x00007fff875985c9 start + 1 

हालांकि, पूर्वावलोकन प्रदर्शित करना समस्या यह है कि मैं इसे डीबग नहीं कर सकता हूं और कोई लॉग नहीं मिलता है। मैं 'kUTTypeHTML' सामग्री प्रकार UTI के साथ QLPreviewRequestSetDataRepresentation का उपयोग कर रहा हूं।

मैं इसे कैसे हल कर सकता हूं? यह एक्सकोड और ओएस एक्स के पुराने संस्करणों पर ठीक काम करता था। मुझे एक्सकोड से अपनी प्लगइन डीबग करने में सक्षम होना चाहिए। धन्यवाद।

+0

मैंने सामग्री प्रकार यूटीआई को 'kUTTypePlainText' में बदलने का परीक्षण किया और यह डीकग और एक्सकोड के तहत ठीक से प्रस्तुत करता है। यह क्या हो सकता है? – Anubis

उत्तर

1

मुझे लगता है कि यह बहुत स्पष्ट है कि यह qlmanage (जो अभी भी 10.10.3 बीटा में मौजूद है) में एक बग है - यह HTML आउटपुट को ठीक से नहीं दिखाता है।

  1. उपयोग qlmanage -t (या -t -s someBiggerNumber), पैदा झलकों के लिए आपके कोड QLThumbnailRequestSetThumbnailWithDataRepresentation का उपयोग करता है और काफी हद तक पूर्वावलोकन के लिए एक समान है:

    आप दो तरीके दिए उपयोग कर सकते हैं।

  2. फ़ाइल उत्पन्न जेनरेट करने के लिए qlmanage -o dir का उपयोग करें जिसे आप खोजक से Quicklook के साथ देख सकते हैं।