• 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
Retrieving application name during runtime
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Retrieving application name during runtime


  • Subject: Retrieving application name during runtime
  • From: Peter <email@hidden>
  • Date: Fri, 10 Dec 2004 20:56:12 +0800

I have been trying to get the executable name of the running Cocoa program. I understand the application name is stored in the Info.plist -> CFBundleExecutable but it seems there is no Cocoa method that retrieve the application name. The reason of retrieving application name rather fixing it (#DEFINE or string table) is because I have a few different program names of the same program, also different options for different name.

My questions are,

1) Is there a method to retrieve application name of the running program itself ?

2) Is it possible to get the path of the executable via Cocoa ?
( I know of one possiblity by getting via main(argc, argv) --> argv[0] by C)


3) Is it possible to retrieve command line arguments via Cocoa ?


Thanks in Advance.


Peter

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Retrieving application name during runtime
      • From: Sherm Pendley <email@hidden>
    • Re: Retrieving application name during runtime
      • From: Ken Ferry <email@hidden>
    • Re: Retrieving application name during runtime
      • From: Louis Sinclair <email@hidden>
  • Prev by Date: Kill other process's warning dialog
  • Next by Date: Re: [OT] Objective-C history
  • Previous by thread: Re: Kill other process's warning dialog
  • Next by thread: Re: Retrieving application name during runtime
  • Index(es):
    • Date
    • Thread