Re: App behaves differently when run in Xcode
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