• 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: App behaves differently when run in Xcode
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: App behaves differently when run in Xcode


  • Subject: Re: App behaves differently when run in Xcode
  • From: Sherm Pendley <email@hidden>
  • Date: Fri, 28 Oct 2005 03:59:18 -0400

On Oct 28, 2005, at 3:49 AM, Victor Tran wrote:

Hmm ok I'll try using the full path. The logs I'm
talking about are the actual outputs of the
application. So how do I get the current working
directory of the app?

Why do you need that directory? Quite often, it won't be writable anyway, because your application will be installed in /Applications and being run by a non-admin user. In the general case, even if the directory happens to be writable, storing data and programs in the same place is a terrible idea.


So, now that I've told you that you're holding a gun and pointing it at your foot, here's the bullet you asked for. ;-)

    NSString *appPath = [[NSBundle mainBundle] bundlePath];

sherm--

Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org

_______________________________________________
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: App behaves differently when run in Xcode
      • From: Bergmann Manfred <email@hidden>
    • Re: App behaves differently when run in Xcode
      • From: Victor Tran <email@hidden>
References: 
 >Re: App behaves differently when run in Xcode (From: Victor Tran <email@hidden>)

  • Prev by Date: Refreshing superview
  • Next by Date: Re: Refreshing superview
  • Previous by thread: Re: App behaves differently when run in Xcode
  • Next by thread: Re: App behaves differently when run in Xcode
  • Index(es):
    • Date
    • Thread