Modify TCC.db

Hello all,

I am working on MacOS application which needs to get name of active window. Application is written in Qt/C++. To get the active window and the name of it I am using AppleScript. Is this the best way to achieve this?

On MacOS Mojave I have been read that I need to modify TCC.db file to add my application so no dialog would appear asking for confirmation to the user. Is modifying tcc.db enough to whitelist my application or do I need to create some kind of Policy Control profile?

Finally, could someone tell me how to access tcc.db and modify it?

Thanks in advance and Regards