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

How to pass command line parameters to Cocoa App


  • Subject: How to pass command line parameters to Cocoa App
  • From: Abdul Sowayan <email@hidden>
  • Date: Tue, 16 Aug 2011 10:54:18 -0400
  • Thread-topic: How to pass command line parameters to Cocoa App

Hi folks,

If I launch my app from the command line, I can pass it options like this
(this would be the argc, argv parameters to main):

./Foo.app/Contents/MacOS/Foo -ApplePersistenceIgnoreState YES


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.

Thanks,
Abdul
_______________________________________________

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 pass command line parameters to Cocoa App
      • From: douglas welton <email@hidden>
    • Re: How to pass command line parameters to Cocoa App
      • From: Eric Wing <email@hidden>
    • Re: How to pass command line parameters to Cocoa App
      • From: Jens Alfke <email@hidden>
    • Re: How to pass command line parameters to Cocoa App
      • From: Scott Ribe <email@hidden>
  • Prev by Date: Re: Problems with UIAlertView
  • Next by Date: Re: How to pass command line parameters to Cocoa App
  • Previous by thread: Re: What does the UIReturnKeyTypeGo does exactly?
  • Next by thread: Re: How to pass command line parameters to Cocoa App
  • Index(es):
    • Date
    • Thread