• 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
how to make cocoa application run as a command line tool?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how to make cocoa application run as a command line tool?


  • Subject: how to make cocoa application run as a command line tool?
  • From: XiaoGang Li <email@hidden>
  • Date: Tue, 20 Oct 2009 17:58:06 +0800

Greetings,
        I have created an document-based cocoa application, now I need to
provide a command line interface for my users.
for example, users input this into the terminal:
./myApplication.app/Contents/MacOS/myApplication -c --srcFolder "A/B/C"
--dstFolder "A/B/D";
I can get the argument information through [[NSProcessInfo processInfo]
arguments] in the init method of the application
delegate, and parse the arguments, then step by step.
My question is that, I don't want the window and other document be displayed
on the screen, even the menu.
I want all the action be processed  without user's interventio.
Maybe, this feature seems odd. anyway, however, user can open my application
in the Finder, and open a document to edit it. but they
also can run it like a shell command utility to do some other faceless work,
like convert the type the document to another type.

I don't know whether I have a detailed description for my issue, but I will
be very appreciated for your feedback.
_______________________________________________

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: how to make cocoa application run as a command line tool?
      • From: Paul M <email@hidden>
    • Re: how to make cocoa application run as a command line tool?
      • From: Kai BrĂ¼ning <email@hidden>
  • Prev by Date: Re: Custom NSURLProtocol crashes when using Garbage Collection
  • Next by Date: Re: how to make cocoa application run as a command line tool?
  • Previous by thread: Re: GC Basic questions
  • Next by thread: Re: how to make cocoa application run as a command line tool?
  • Index(es):
    • Date
    • Thread