I am developing a Mac application. Within this application, I need to execute certain commands and expressions with root privilege access. I am working to perform this action, and once authenticated, it should persist throughout the entire app lifecycle. Similar to allowing keychain access for Xcode applications by selecting the 'Always allow' permission.
Please let me know:
1. Is it possible for a third-party application to exhibit such behavior?
2. If it is possible, what type of permissions do I need to set?
3. Do I need any specific entitlements for this?
Thank you for your insights and assistance. Your responses are highly valued, and any guidance you can provide will be greatly appreciated.