Re: Self contained command line tool
Re: Self contained command line tool
- Subject: Re: Self contained command line tool
- From: Kyle Sluder <email@hidden>
- Date: Fri, 12 Oct 2012 11:27:03 -0700
On Fri, Oct 12, 2012, at 11:11 AM, Gene Crucean wrote:
> There are lot's of reasons for this. You can drag and drop a file to
> perform some automated task on it, or just automate some task. You can
> also
> use cron jobs to launch the app. Just the other day I whipped up a tiny
> app
> that lets me drag and drop files/folders onto my app's icon to use 7zip
> for
> archiving. Those are simple examples but you can do quite a bit without
> an
> interface :)
Except the program won't have correctly checked in with the window
server and might not be registered in the correct bootstrap namespace.
Here I will distinguish between an app—which connects to system services
like the pasteboard—and a command line tool.
If you want to write an app, write an app. That means calling
NSApplicationMain. If you don't want to present a UI, use the
LSUIElement key in your Info.plist.
Do not launch apps using cron. They will probably wind up in the wrong
bootstrap namespace. If you want to launch an app, use launchd. Make
sure you configure the plist correctly to launch the app in the user's
GUI session.
--Kyle Sluder
_______________________________________________
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