I tried some solutions I found online and was able to fix the issue. The problem was resolved when I used entitlements to disable library validation.
<dict>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
</dict>
However, I have no clue what the actual error was. I don't want to disable library validation without getting proper knowlegde of what I am doing; I want to understand why my installer (an .app file created using a Java project) doesn't work after being code-signed with hardened runtime. I want to identify the error.
Some solutions and documentation suggest that the dynamic linker can be used to obtain detailed error messages when library validation fails. According to the "Disable Library Validation Entitlement" documentation, "The macOS dynamic linker (dyld) provides a detailed error message when the system prevents code from loading due to library validation." Does this also apply to the app file or is it applicable for other type of files like jar? (I have posted another question related to this)
I'm completely new to these concepts. Could you please provide a detailed process on how I can retrieve error logs using the dynamic linker when the installer (.app) fails to open?
Can I use direct commands? Modifying the bundle to invoke dynamic linker will be extremely tedious task.