A specific func in my Swift application need root privileges. I was wondering if there is a way to gain root access at start of this func to run the following code with this privileges. Until now I only found a way to gain root access and then run a separate executable which I don't need and which wouldn't work for me.
Thanks for any hint!