I use NSWorkspace sharedWorkspace
method recycleURLs: completionHandler:
to delete files.
If the user does not have the correct permissions e.g. to delete from /Applications
this produces an error.
Finder
prompts the user for the sudo
password then proceeds to delete files.
While it is easy enough to detect the error, and prompt the user, I can't figure out how I could then programmatically force deletion.