how to actively request access kTCCServiceScreenCapture and kTCCServiceListenEvent ?


I want to request this permission when the app starts, not when it is running.

My app will access the privacy related to Input Monitering and Screen sharing at runtime, and pop up the prompt for authorized access during the app run. If there are other apps that have popped up a different privacy authorization access prompt before then, then my The app will be suspended, how should I handle this situation better? What I am thinking of at the moment is to actively request authorization at startup.

how to actively request access kTCCServiceScreenCapture and kTCCServiceListenEvent ?
 
 
Q