I have a macOS Cocoa application that does not behave correctly when it's launched:
- when the application is run from Xcode, it launches fine.
- when the same .app application bundle is double-clicked in the Finder, the app does not finish launching and keeps bouncing in the Dock.
- same issue when the app is added to the Dock and its icon in the Dock is clicked.
- when the executable in Contents/MacOS is run from the Terminal, it launches fine.
- when using open application.app from the Terminal, it works fine.
When it does not work, there are multiple log errors in Console.app:
error 16:03:03.882942+0200 launchservicesd LAUNCH: Failed sending SIGCONT to process 0x0-0x72072 16968 com.company.application, errno=1 so waiting a bit and trying again.
If I disable the hardened runtime option, the application can be opened fine from the Finder or the Dock.
The .app is codesigned with the timestamp option. Same problem with either a debug or release build.
I checked the different documentation regarding hardened runtime conflict or incorrect build settings and I didn't see a match for this case.
[Q] Is there some documentation or article on the Apple website that I missed that covers this LAUNCH: Failed sending SIGCONT error and its possible origin?