4

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

ATV
  • 4,116
  • 3
  • 23
  • 42

1 Answers1

7

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

Vladimir Afinello
  • 1,211
  • 14
  • 16
  • Thanks for the thorough explanation - can't quite remember what it took to get it finally working. That fact that it doesn't immediately appear to work even after everything is set up correctly due to Help Viewer cashing doesn't help either. I've accepted your answer as it contains all the keys that are now present in my working help book. There might yet be more to it, though. It's a huge pain to set these up initially with no debugging support whatsoever... – ATV Dec 02 '15 at 17:23