A few more additions that may help others. I will contact Technical support for further help.
The problem is not specific to macOS 12 beta, it already occurs in macOS 11.5.1
The rules for launching applications using launchApplicationAtURL: have become stricter in some (undocumented) ways
launchApplicationAtURL: always succeeds regardless of the location of the launched app if the user has previously launched the same app via a double click
launchApplicationAtURL: seems to work when the launched app is in a subfolder of /Applications and the launched app is properly signed
when the launched app is in /Applications but only signed with an ad-hoc certificate, launching still fails. This may be a bug.
Post
Replies
Boosts
Views
Activity
The app that is being launched has to be in /Applications in macOS 12 and this is a change from macOS 11. In macOS 11, as far as I can see, it could be anywhere as long as that location was accessible by the user and the sandbox.
(The app that is doing the launching is always in /Applications anyway)
It turns out that there were two independent problems:
I had a configuration error at first so spctl didn’t verify the application originally. I have fixed that.
For reference, my Info.plist file declared CFBundlePackageType as BNDL instead of APPL.
Now, launching the application works as long as the application is in /Applications but it does not work when it is in any other (accessible) location, e.g., /Library/Application Support/...
The question is now, is this change intended in macOS 12?