Thanks!
The app (under development, using Xcode) IS NOT sandboxed. So, it must be a permission issue. Now, I was able to run some commands that requires sudo (certain hdiutil for example), so I verified that the sudo passw was transmited correctly and some kind of permission were actually granted. The issue happened with asr, which even after being able to validate the admin password (which I passed in a command via process and pipe) it still produced the error.
You said "I recommend against using sudo". What would you recommend to to? Would it be using a helper tool (and if that case, could you please point me to a good tutorial on implementing and using a helper tool within a swiftUI app?
Further comments:
(from the first link)
That is nearly my case, I'm just trying to have the terminal command executed from my swift app and show/uses there some results.
That is also my case, only need to execute a couple of sudo commands just to grab some info produced by asr and hdiutil.
After knowing a little more about what I'm trying to do, would you recommend a helper or using the deprecated AuthorizationExecuteWithPrivileges would be fine? Or how can I get my sudo command being sent from my app thru Process() fully recognized as when I use it right in the terminal console?
Again, thanks a lot for your prompt reply and insightful information,
Best,
Lautaro