Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Senor Cuete

macrumors 6502
Original poster
Nov 9, 2011
431
32
It has always been a hassle to get XCode to update the an application's Help Book. In the past I have been able to get it done by following these instructions:

Delete any other versions and empty the trash.
Update the About app.html, version and copyright
Update the Help.plist
Create a new Help.helpindex using the help indexer
Remove the help folder from project.
Delete the system’s cached help folder using the terminal command:
rm -rf ~/Library/Caches/com.apple.help*
Clean and rebuild the project without the Help folder
Add the new Help folder, clean and rebuild
Check to be sure that the new help book is added
You might have to restart your machine

Now this doesn't work. When I run my project with the new Help Book the Help Book window says:

The selected topic is currently unavailable.
The topic you were trying to view could not be found.

XCode logs:

2017-09-20 13:45:49.466114-0600 app[2349:187674] Entering AHRegisterHelpBookWithURL
2017-09-20 13:45:49.466228-0600 app[2349:187674] Entering AHRegisterHelpBookWithURL: 0
 
A post on Stack overflow says to do execute more terminal commands.:

rm -rf ~/Library/Caches/com.apple.help*
rm -rf ~/Library/Preferences/com.apple.help*
rm -rf ~/.Trash/*

Also I trashed the cached versions of the app in:

username>Library>Developer>XCode>Derived Data>appname-(long text of goblygook).Build.Products>Debug>App
and ... > Release.

Then I re-started my Mac.

I also tried to archive the app and then export it.

I doesn't help.
[doublepost=1506016813][/doublepost]I also read the Apple Help Programming Guide - How to register Your Help Book.
CFBundleHelpBookFolder and CFBundleHelpBookName strings are correct and they haven't changed since I started to have this problem.
 
It has always been a hassle to get XCode to update the an application's Help Book. In the past I have been able to get it done by following these instructions:

Delete any other versions and empty the trash.
Update the About app.html, version and copyright
Update the Help.plist
Create a new Help.helpindex using the help indexer
Remove the help folder from project.
Delete the system’s cached help folder using the terminal command:
rm -rf ~/Library/Caches/com.apple.help*
Clean and rebuild the project without the Help folder
Add the new Help folder, clean and rebuild
Check to be sure that the new help book is added
You might have to restart your machine

Now this doesn't work. When I run my project with the new Help Book the Help Book window says:

The selected topic is currently unavailable.
The topic you were trying to view could not be found.

XCode logs:

2017-09-20 13:45:49.466114-0600 app[2349:187674] Entering AHRegisterHelpBookWithURL
2017-09-20 13:45:49.466228-0600 app[2349:187674] Entering AHRegisterHelpBookWithURL: 0

Even worse the app is totally missing ALL its guide inside the Documentation Browser.
This has to be the greatest oversight in Xcode History !
 
A post on Stack overflow says to do execute more terminal commands.:

rm -rf ~/Library/Caches/com.apple.help*
rm -rf ~/Library/Preferences/com.apple.help*
rm -rf ~/.Trash/*

Also I trashed the cached versions of the app in:

username>Library>Developer>XCode>Derived Data>appname-(long text of goblygook).Build.Products>Debug>App
and ... > Release.

Then I re-started my Mac.

I also tried to archive the app and then export it.

I doesn't help.
[doublepost=1506016813][/doublepost]I also read the Apple Help Programming Guide - How to register Your Help Book.
CFBundleHelpBookFolder and CFBundleHelpBookName strings are correct and they haven't changed since I started to have this problem.

I read the Bundle Programming Guide and the Help Programming Guide and compared my .plists side by side to the guides. The Info.plists are EXACTLY as they are in the guides.

The first paragraph of the Apple Help Programming Guide - Help Book Registration section says that you can register your Help Book by calling AHRegisterHelpBook. You actually can't do this because this is a Carbon function. Carbon is 32-bit and it won't link in a 64-bit Cocoa project.

You can try to register your help Book manually by doing this:
Code:
BOOL yesOrNo = [[NSHelpManager sharedHelpManager] registerBooksInBundle: [NSBundle mainBundle]];
This will return YES, but the help Book won't be available.
 
Even worse the app is totally missing ALL its guide inside the Documentation Browser.
This has to be the greatest oversight in Xcode History !

The guides are on-line:

Apple Help Programming Guide:

https://developer.apple.com/library...nce_intro.html#//apple_ref/doc/uid/TP30000903

Bundle Programming Guide:

https://developer.apple.com/library...tual/CFBundles/Introduction/Introduction.html

I have gone through these with my project open and compared the documentation with my Help Book and .plists and so far I can't register my Help Book. Now I'm opening Application packages and looking at these files to see how they do it.
 
Are you using pure HTML & text or pulling images ( via HTML/CSS ) from a 'Content' folder. Writing a quick app last week and noticed the drag / drop 'Content' folder over to the project did not actually include the images into the project when checked from the 'Copy Files Over' modal.

I had to manually select each individual graphic and audio file within the content folder, then:
Show In The File Inspector > Target Membership ( bottom ) > manually check the item to include it.

Been reported by many as bug to Apple.
 
Are you using pure HTML & text...

Yes. Including my Help Book folder in a project, being sure that the folder is checked as Target membership - appname. The Help Book Directory Name and Help Book Identifier are correct. XCode 9 WILL NOT MAKE THE HELP BOOK SHOW UP in the app. I have had this in my project for years. Other versions did it but XCode 9 won't.
[doublepost=1506358423][/doublepost]I got it to work. Important:

1. The help Book authoring guide refers to the Help Book folder as a bundle and shows it in the app bundle hierarchy as a .help bundle DON'T make the Help Book folder a bundle with a .help extension.

2. When you add the Help Folder to the project, be sure to check the radio button in the add files dialog as " Create Folder references..."

3. In XCode 9 dragging the help folder into the project won't automatically include it as a member of the target. Highlight the help folder in the project navigator. in the right pane check the Target Membership check box.

4. Check the strings in the help-Info.plist very carefully. The help-Info.plist strings I had in older versions of the project worked before but not now.
 
Yes. Including my Help Book folder in a project, being sure that the folder is checked as Target membership - appname. The Help Book Directory Name and Help Book Identifier are correct. XCode 9 WILL NOT MAKE THE HELP BOOK SHOW UP in the app. I have had this in my project for years. Other versions did it but XCode 9 won't.
[doublepost=1506358423][/doublepost]I got it to work. Important:

1. The help Book authoring guide refers to the Help Book folder as a bundle and shows it in the app bundle hierarchy as a .help bundle DON'T make the Help Book folder a bundle with a .help extension.

2. When you add the Help Folder to the project, be sure to check the radio button in the add files dialog as " Create Folder references..."

3. In XCode 9 dragging the help folder into the project won't automatically include it as a member of the target. Highlight the help folder in the project navigator. in the right pane check the Target Membership check box.

4. Check the strings in the help-Info.plist very carefully. The help-Info.plist strings I had in older versions of the project worked before but not now.
Glad you got it working! I spent a good four hours trying to figure it out after updating to XCode 9.
 
It has always been a hassle to get XCode to update the an application's Help Book. In the past I have been able to get it done by following these instructions:

Delete any other versions and empty the trash.
Update the About app.html, version and copyright
Update the Help.plist
Create a new Help.helpindex using the help indexer
Remove the help folder from project.
Delete the system’s cached help folder using the terminal command:
rm -rf ~/Library/Caches/com.apple.help*
Clean and rebuild the project without the Help folder
Add the new Help folder, clean and rebuild
Check to be sure that the new help book is added
You might have to restart your machine

Now this doesn't work. When I run my project with the new Help Book the Help Book window says:

The selected topic is currently unavailable.
The topic you were trying to view could not be found.

XCode logs:

2017-09-20 13:45:49.466114-0600 app[2349:187674] Entering AHRegisterHelpBookWithURL
2017-09-20 13:45:49.466228-0600 app[2349:187674] Entering AHRegisterHelpBookWithURL: 0

https://developer.apple.com/library...de/ConfiguringYourApp/ConfiguringYourApp.html

"The bundle ID string must be a uniform type identifier (UTI) that contains only alphanumeric characters (A-Z,a-z,0-9), hyphen (-), and period (.)."

So it looks like you could use a help bundle if the name didn't contain a space.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.