是的 - 所以我创建了一本帮助手册,做了 all the right things , 仔细检查了我的 plist
和 index.html
文件,我得到的只是臭名昭著的
The selected topic is currently unavailable.
尝试打开帮助手册时控制台中的唯一条目是一个普通的
3/8/15 1:23:42.467 PM HelpViewer[35015]: Couldn't find book with this ID: (null)
帮助不大。
从这里去哪里?
Apple 帮助有什么调试技巧吗?
要打开日志记录吗?有什么……吗?
最佳答案
刚刚在同样的问题上苦苦挣扎了几个小时。
ID: (null)
表示您缺少 CFBundleName
或 HPDBookTitle
键,或者 CFBundleName 不正确。您应该可以在 HelpViewer 日志中正常看到您的包标识符。
在我确定我的帮助手册 Info.plist
文件至少配置了这些六个键后,它开始工作了:
...
<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
文件包含这些记录:
...
<key>CFBundleHelpBookFolder</key>
<string>ProjectHelp.help</string>
<key>CFBundleHelpBookName</key>
<string>com.company.project.help</string>
...
这假设您有一个 ProjectHelp.help
目标,它被复制到主项目 Resources 文件夹中。
然后构建一个发布方案并将您的项目 .app 文件复制到应用程序文件夹。在那之后,我的帮助手册开始工作了。是的,在将签名的 .app 安装到应用程序文件夹之后。
如果它仍然不起作用,您也可以尝试清除 HelpViewer 程序缓存。 HelpViewer 重置说明here
关于objective-c - 调试帮助书 ("The selected topic is currently unavailable"),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28926232/