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 selected topic is currently unavailable.
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)
Not too helpful.
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.
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
来源:https://stackoverflow.com/questions/28926232/debugging-help-book-the-selected-topic-is-currently-unavailable