Debugging Help Book (“The selected topic is currently unavailable”)

心不动则不痛 提交于 2019-12-03 17:15:24

Just struggled a few hours with the same problem.

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.

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>
...

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>
...

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

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.

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!