You can make your app trigger a command-line program and pass params using 
NSTask. It’s not difficult to use. But in this case you might want to negotiate 
this with the user - apps that just go ahead and change MY system preferences 
are being user-hostile to say the least.

—Graham



> On 28 Jun 2020, at 2:46 am, Gabriel Zachmann via Cocoa-dev 
> <cocoa-dev@lists.apple.com> wrote:
> 
> Basically, what I'd like to do in my app is what I can do using this on the 
> command line:
> 
>   defaults -currentHost write com.apple.screensaver idleTime

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to