OSX Quicklook 调试

发布于 2024-09-24 08:43:27 字数 2120 浏览 0 评论 0原文

我正在为 MPO 文件编写一个快速查看插件。

该插件并不是什么大问题,但问题在于尝试调试它。苹果的文档说要调试你可以使用

qlmanage -r <filename>

And I have.但是,我的断点都不匹配。我认为这是因为它与我的 Quicklook 插件与类型不匹配。使用 mdl (或 mdimport)我得到 dyn.ah62d4rv4ge8046dt 的文件类型。使用它我什么也得不到。我已经使用了 info.plist,因为我认为这就是问题所在,并且我已经查看了其他插件来解决这个问题,但仍然没有断点命中,并且它没有使用我的代码。

我的 info.plist (的重要部分)目前看起来像这样:

<key>CFBundleDocumentTypes</key>
    <array>
        <dict>
            <key>CFBundleTypeRole</key>
            <string>QLGenerator</string>
            <key>LSItemContentTypes</key>
            <array>
                <string>dyn.ah62d4rv4ge8046dt</string>
            </array>
        </dict>
        <dict>
            <key>CFBundleTypeRole</key>
            <string>QLGenerator</string>
            <key>LSItemContentTypes</key>
            <array>
                <string>public.image.mpo</string>
            </array>
        </dict>
    </array>
...

    <key>UTImportedTypeDeclarations</key>
    <array>
        <dict>
            <key>UTTypeConformsTo</key>
            <array>
                <string>public.data</string>
                <string>public.image</string>
            </array>
            <key>UTTypeDescription</key>
            <string>MPO Image file</string>
            <key>UTTypeIconFile</key>
            <string>MPO</string>
            <key>UTTypeIdentifier</key>
            <string>public.image.mpo</string>
            <key>UTTypeTagSpecification</key>
            <dict>
                <key>public.filename-extension</key>
                <array>
                    <string>mpo</string>
                </array>
            </dict>
        </dict>
    </array>

是否有任何明显我在这里丢失的东西,或者它没有执行我的插件的任何其他原因?

I am writing a quicklook plugin for an MPO file.

The plugin isn't that much of a problem, but the problem is trying to debug it. Apples documentation says that to debug you use

qlmanage -r <filename>

And I have. However, none of my breakpoints are matched. I assume this is as it hasn't matched my quicklook plugin with the type. Using mdl (or mdimport) i get a filetype of dyn.ah62d4rv4ge8046dt. Using that I get nothing. I have played around with the info.plist, as I assume that is the problem, and I have looked at other plugins to fix that, but still no breakpoints hit and it is not using my code.

My (important parts of) info.plist currently looks like this:

<key>CFBundleDocumentTypes</key>
    <array>
        <dict>
            <key>CFBundleTypeRole</key>
            <string>QLGenerator</string>
            <key>LSItemContentTypes</key>
            <array>
                <string>dyn.ah62d4rv4ge8046dt</string>
            </array>
        </dict>
        <dict>
            <key>CFBundleTypeRole</key>
            <string>QLGenerator</string>
            <key>LSItemContentTypes</key>
            <array>
                <string>public.image.mpo</string>
            </array>
        </dict>
    </array>
...

    <key>UTImportedTypeDeclarations</key>
    <array>
        <dict>
            <key>UTTypeConformsTo</key>
            <array>
                <string>public.data</string>
                <string>public.image</string>
            </array>
            <key>UTTypeDescription</key>
            <string>MPO Image file</string>
            <key>UTTypeIconFile</key>
            <string>MPO</string>
            <key>UTTypeIdentifier</key>
            <string>public.image.mpo</string>
            <key>UTTypeTagSpecification</key>
            <dict>
                <key>public.filename-extension</key>
                <array>
                    <string>mpo</string>
                </array>
            </dict>
        </dict>
    </array>

Is there anything obviously that I am missing here, or any other reason that it is not executing my plugin?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

吐个泡泡 2024-10-01 08:43:27

回答我自己的问题,它只会调试 /Library/QuickLook 文件夹中已有的内容。

现在已制作并可用从这里

Answering my own question, it will only debug something that is already in the /Library/QuickLook folder.

So now produced and available from here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文