Re: Accessing PackageKit programmatically
Re: Accessing PackageKit programmatically
- Subject: Re: Accessing PackageKit programmatically
- From: John Paul Adrian Glaubitz <email@hidden>
- Date: Mon, 13 Jun 2016 20:40:32 +0200
On 06/13/2016 08:33 PM, Erik Berglund wrote:
> Using NSTask is the way to do this
How do I verify the installation worked as expected? How do I read out the error message in case it fails?
> but using AppleScript to elevate privileges is deprecated, you need to create a helper application that you call which
> handles the privilege escalation.
>
Which is incredibly convoluted when using SMJobBless. In fact, it requires the application to be signed with an Apple
Developer account. You can't even build Apple's sample app to test the mechanism.
> If you just use standard pkgs, then all you need is the /usr/sbin/installer binary, that is silent and supported.
Again, the problem is that there is no reliable way to query the installer.
> As for elevating privileges, then you create a privileged helper tool that you use to run the installation task.
>
> https://developer.apple.com/library/mac/documentation/Security/Conceptual/SecureCodingGuide/Articles/AccessControl.html
> https://developer.apple.com/library/mac/samplecode/EvenBetterAuthorizationSample/Introduction/Intro.html#//apple_ref/doc/uid/DTS40013768-Intro-DontLinkElementID_2
As far as I know, Apple wants you to use this mechanism nowadays:
> https://developer.apple.com/library/mac/samplecode/SMJobBless/Introduction/Intro.html
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer - email@hidden
`. `' Freie Universitaet Berlin - email@hidden
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden