In our app, we're packaging a help book bundle with the app, which works fine on all our test systems from macOS 10.10 through 11.5.
However, in 12 and 12.0.1, attempting to open the help book via the menu item in the "Help" menu or directly via -[NSApplication showHelp:] will open the builtin HelpViewer app with a blank window, unless the application bundle itself is stored in /Applications. This seems to be due to a sandboxing problem with HelpViewer, where it is not allowed to access the packaged help bundle, if the app is not stored in /Applications.
Here's an excerpt from Console.app when running our app from my desktop and trying the open the help book via the default "Help" menu entry.
error 22:10:48.792960+0100 kernel Sandbox: HelpViewer(39221) deny(1) file-issue-extension target:/Users/gck/Desktop/OUR_APP.app/Contents/Resources/OUR_APP_Help.help/Contents/Resources/en.lproj class:com.apple.app-sandbox.read
error 22:19:13.577568+0100 kernel Sandbox: HelpViewer(39861) deny(1) file-read-data /Users/gck/Desktop/OUR_APP.app/Contents/Resources/OUR_APP_Help.help
error 22:19:13.758827+0100 kernel 1 duplicate report for Sandbox: HelpViewer(39861) deny(1) file-read-data /Users/gck/Desktop/OUR_APP.app/Contents/Resources/OUR_APP_Help.help
error 22:19:13.758835+0100 kernel Sandbox: HelpViewer(39861) deny(1) file-issue-extension target:/Users/gck/Desktop/OUR_APP.app/Contents/Resources/OUR_APP_Help.help/Contents/Resources class:com.apple.app-sandbox.read
error 22:19:13.759459+0100 kernel Sandbox: HelpViewer(39861) deny(1) file-issue-extension target:/Users/gck/Desktop/OUR_APP.app/Contents/Resources/OUR_APP_Help.help/Contents/Resources/en.lproj class:com.apple.app-sandbox.read
If the app is stored in /Applications, HelpViewer can access the help bundle just fine and displays it properly. All versions of macOS before 12 do not exhibit this problem.
This is quite impactful, since a user downloading our app from the browser (as opposed to the App Store) will typically launch it the first time either from ~/Downloads or drag it to ~/Desktop – We are referring to our help book during the onboarding process, but users on Monterey will only be presented with a white screen in HelpViewer if they open it. We could only display a warning that the app needs to be in /Applications for the help book to work (and get indexed), but this is clearly not the intended behavior.
The app is correctly code-signed and notarized (with stapled receipt).
It is possible that this problem might only occur on arm64, since we currently don't have an x86_64 system with Monterey available for testing.
As a workaround, we can open the help book in the browser on 12.0+ for now, if the app is not launched from /Applications, but that is crummy...
Did anyone encounter the same problem and found a better solution? Is there an entitlement to allow HelpViewer to access the bundled help book in 12.0? Any help/idea would be appreciated much!
Cheers, Georg