• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Sandboxing and calling Launchctl
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sandboxing and calling Launchctl


  • Subject: Re: Sandboxing and calling Launchctl
  • From: Stephane Sudre <email@hidden>
  • Date: Tue, 29 May 2012 13:24:31 +0200

On Tue, May 29, 2012 at 10:52 AM, Mark Allan
<email@hidden> wrote:
> Hi all,
>
> I posted this to the developer forums yesterday but I think this list probably gets a good bit more eyeball than the forum, so I'm sending here too. Sorry for the cross-post if you're seeing it twice.  Anyway...
>
> I'm trying to put together the last bits and pieces of sandboxing my app but I've just hit a problem.  I don't appear to be able to use launchctl to schedule tasks any more.
>
> With my app sandboxed, I'm launching an NSTask with the following launch path and arguments:
>> /bin/launchctl load -w /Users/mark/Library/Containers/<my app identifier>/Data/Library/LaunchAgents/<my app identifier>.helpername.plist
>
>
> I'm using the correct APIs to get the path and read/write the helpername.plist file.  As per other command line tools I launch via NSTask, launchctl is presumably inheriting the same entitlements as my main application, but launchctl obviously needs to modify other files to which my app normally wouldn't have access - namely:[...]

SMLoginItemSetEnabled can be a solution.

https://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLoginItems.html

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Sandboxing and calling Launchctl
      • From: Torsten Curdt <email@hidden>
    • Re: Sandboxing and calling Launchctl
      • From: Mark Allan <email@hidden>
References: 
 >Sandboxing and calling Launchctl (From: Mark Allan <email@hidden>)

  • Prev by Date: Re: NSTextInputClient Protocol Question
  • Next by Date: Re: Sandboxing and calling Launchctl
  • Previous by thread: Sandboxing and calling Launchctl
  • Next by thread: Re: Sandboxing and calling Launchctl
  • Index(es):
    • Date
    • Thread