running macOS UI based Application as root
Solution 1:
Security Risk
macOS is not designed to have general applications run as the root user. This would be viewed as a security risk by Apple's engineers.
XPC Services
Running a graphical application, and all the frameworks that requires, as root
is not advisable. The surface area for security problems and mistakes is huge.
AuthorizationExecuteWithPrivileges
is now deprecated. Instead, Apple promote XPC Services as a way dividing up sections of applications that require higher privileges.