• 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: How to pass command line parameters to Cocoa App
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to pass command line parameters to Cocoa App


  • Subject: Re: How to pass command line parameters to Cocoa App
  • From: Scott Ribe <email@hidden>
  • Date: Tue, 16 Aug 2011 09:08:42 -0600

On Aug 16, 2011, at 8:54 AM, Abdul Sowayan wrote:

> What I would like to have is launch my application from the GUI and somehow
> pass the command line parameters to it. If I had to guess, this would be
> encoded in the Info.plist file in the bundle. It is not clear to me how to
> do that. Any feedback would be greatly appreciated.

I don't think you can do that; the whole idea of command-line args to GUI apps just doesn't have a place in Mac OS.

Oddly though, I think there is a plist key which lets you specify environment variables, so you can have the same effect. I don't remember the key name, but it's LSxxx since it is a LaunchServices key.

--
Scott Ribe
email@hidden
http://www.elevated-dev.com/
(303) 722-0567 voice




_______________________________________________

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

References: 
 >How to pass command line parameters to Cocoa App (From: Abdul Sowayan <email@hidden>)

  • Prev by Date: How to pass command line parameters to Cocoa App
  • Next by Date: Re: Properly wrapping non-contiguous NSTextViews
  • Previous by thread: How to pass command line parameters to Cocoa App
  • Next by thread: Re: How to pass command line parameters to Cocoa App
  • Index(es):
    • Date
    • Thread