调试帮助手册(“所选主题​​当前不可用") [英] Debugging Help Book ("The selected topic is currently unavailable")

查看:39
本文介绍了调试帮助手册(“所选主题​​当前不可用")的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对 - 所以我创建了一本帮助手册,所有正确的事情,仔细检查了我的plistindex.html文件,而我得到的只是臭名昭著的

Right - so I've created a help book, did all the right things, double-checked my plist and index.html files, and all I get is the notorious

所选主题当前不可用.

当试图打开帮助手册时,控制台中唯一的条目是一个普通的

The only entry in Console when attempting to open the help book is a plain

3/8/15 1:23:42.467 PM HelpViewer[35015]: Couldn't find book with this ID: (null)

不太有用.

从这里去哪里?
Apple 帮助是否有任何调试技术?
登录要打开吗?有什么事吗..?

Where to go from here?
Are there any debugging techniques for Apple Help?
Logging to turn on? Anything..?

推荐答案

刚遇到同样的问题就挣扎了几个小时.

Just struggled a few hours with the same problem.

ID: (null) 表示您缺少 CFBundleNameHPDBookTitle 键,或者 CFBundleName 不正确.正常情况下,您应该会在 HelpViewer 日志中看到您的包标识符.

The ID: (null) means that you are missing CFBundleName or HPDBookTitle keys, or CFBundleName is incorrect. You should see your bundle identifier in HelpViewer logs normally.

在我确定我的帮助手册 Info.plist 文件至少配置了这些 六个键后,它就可以工作了:

Got it working after I made sure, that my help book Info.plist file has at least these six keys configured:

...
<key>CFBundleIdentifier</key>
<string>com.company.project.help</string>

<key>CFBundleName</key>
<string>ProjectHelp</string>

<key>HPDBookAccessPath</key>
<string>index.html</string>

<key>HPDBookIconPath</key>
<string>icon.png</string>

<key>HPDBookTitle</key>
<string>Project Help</string>

<key>HPDBookType</key>
<string>3</string>
...

和主项目Info.plist文件包含这些记录:

and the main project Info.plist file contains these records:

...
<key>CFBundleHelpBookFolder</key>
<string>ProjectHelp.help</string>

<key>CFBundleHelpBookName</key>
<string>com.company.project.help</string>
...

这假设您有一个 ProjectHelp.help 目标,该目标已复制到主项目资源文件夹中.

This assumes that you have a ProjectHelp.help target which is copied into main project Resources folder.

然后构建发布方案并将您的项目 .app 文件复制到 Applications 文件夹.在那之后,我得到了我的帮助手册.是的,在将签名的 .app 安装到 Applications 文件夹后.

Then build a Release scheme and copy your project .app file to Applications folder. After that I got my help book working. Yes, after installing the signed .app into Applications folder.

如果仍然无效,您也可以尝试清除 HelpViewer 程序缓存.HelpViewer 重置描述此处

You could also try to clear HelpViewer program caches if it still doesn't work. HelpViewer reset described here

这篇关于调试帮助手册(“所选主题​​当前不可用")的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆