Unable to access calendar events in Mac after code signing the executable

I have written one application in xcode to access the calendar events. The executable is signed and bundled in a package. The package is notarised.
The executable is executed via launchd at regular intervals. It is getting executed at the required intervals however the calendar access is denied. As a result the events are not getting captured.
If I trigger the executable manually via terminal the calendar access is granted and the events are captured.
I have observed one more weird thing, i.e if I do not sign the executable and don't notarise the package then everything works fine.
I have given calendar access to the executable and terminal in Security & privacy.
Any help would be appreciated






Unable to access calendar events in Mac after code signing the executable
 
 
Q