[Interest] Removing files/folders in /Applications under macOS

Roman Wüger roman.wueger at gmx.at
Thu Nov 28 21:30:05 CET 2019


@thiago: it works with sudo when I do something like „sudo /Applications/MyBundle.app/Contents/MacOS/MyBundle“ but not if I try „sudo open /Applications/MyBundle.app“

Normally when I empty my trash, where an application was moved into the trash, then a dialog appears to enter the credentials of a privileged user.

I thought this can also be done with Qt - call a default dialog for this situation.

Regards
Roman


> Am 27.11.2019 um 19:09 schrieb David M. Cotter <dave at kjams.com>:
> 
> i believe you must provide an "entitlement" for that
> 
> https://developer.apple.com/library/archive/documentation/Miscellaneous/Reference/EntitlementKeyReference/Chapters/AboutEntitlements.html
> 
> 
> 
>> On Nov 27, 2019, at 7:07 AM, Roman Wüger <roman.wueger at gmx.at> wrote:
>> 
>> Hello Thiago,
>> 
>> At first, thanks for the quick reply.
>> 
>> when I run a simple bash script it works when I run it with sudo.
>> When I run my Qt application with sudo, then the removeRecursively() only returns false but do not remove anything.
>> 
>> However, I thought that it tries to gain access where dialog appears to enter the administrator.
>> 
>> Regards
>> Roman
>> 
>>>> Am 27.11.2019 um 15:05 schrieb Thiago Macieira <thiago.macieira at intel.com>:
>>>> 
>>>> On Wednesday, 27 November 2019 04:56:02 PST Roman Wüger wrote:
>>>> I’m not able to remove files/dies in /Applications programmatically.
>>> 
>>> Why not? What was the error? Were you running your application as root?
> 
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> https://lists.qt-project.org/listinfo/interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20191128/8645e428/attachment.html>


More information about the Interest mailing list