I am trying to make help pages for my application. I have written the pages as described in the Apple Help Programming Guide. I’ve made a folder myapp.help containing the pages, a plist file, indexing etc. and added it to my app bundle. I’ve also added the CFBundleHelpBookFolder and CFBundleHelpBookName to the app bundle plist.
When I try to register it with AHRegisterHelpBookWithURL() – it fails with error -50 (Error in user parameter list).
I don’t want to set up the help bundle with Xcode because I’m already using Makefiles, thanks.
The problem was that the bundle could not be found by MacOS. I had made a link to the executable inside the bundle; the link was in a directory in my path; I typed the name of link into a terminal to run the program – it seemed a fairly neat way to do things.
I didn’t realise that
CFBundleGetMainBundle()would only work if you started the program from Finder or by entering the path to the executable.