My application provides a unique feature for MacOS 26+ users, while keeping legacy for other versions (12.4+).
So I aim to provide two help books localized package, depending on MacOS' version of the running computer.
I designed two help bundles, with their own Info.plist files (identifiers, default filename…) and I've made multiple checks to verify that all their settings are correct and different when needed.
As an app's info.plist can deal only with one Help Book, my application delegate registers both in
applicationDidFinishLaunching:
using:
[[NSHelpManager sharedHelpManager] registerBooksInBundle:[NSBundle mainBundle]];
In Interface Builder, the help menu item is connected to the application delegate's "showHelp:" method to set the correct help package. The code in this method is:
if (@available(macOS 26.0,*)){
helpbook = @"fr.myapp.updated.help";
} else {
helpbook = @"fr.myapp.legacy.help";
}
[[NSHelpManager sharedHelpManager] openHelpAnchor:@"index" inBook:helpbook];
The problem is that despite the MacOS version of the user's Mac, (either 15.1 or 26.2) , the «legacy» helpbook is always used. All default index.html (for each lproj) have a
<a name="index"></a>
tag immediately after the <body>
I spent dozen of hours to understand the problem, forum parsing, including hours long dialogs with ChatGPT and Claude AIs (not mentioning MacOS' help system cache problems I could solve)
I noticed also, to be complete, that when parsing the application package, opening the legacy .help with "Tips.app" always works, but with the "updated" one the help system opens with an "unavailable content" message. Both help bundles are fully included in the built application.
Tested whether the app is installed in the debug directory, moved to in the Applications one, reboot, emptying/deleting cache files.
So Houston, I have a problem…
Any idea?