• 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: Referencing Files within a App
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Referencing Files within a App


  • Subject: Re: Referencing Files within a App
  • From: email@hidden
  • Date: Mon, 11 Aug 2003 17:11:34 -0400

Thanks, I found what I needed.

- Alex P.

On Monday, August 11, 2003, at 04:39 PM, Marc Weil wrote:

Look at the docs for NSBundle.


On 8/11/03 4:28 PM, "email@hidden" <email@hidden> wrote:

Hello,

How does one reference a file that's in the app's resources folder. I
have a property list in my resources folder which I would like to
reference and so far I've been doing it like this:

NSDictionary *dictionary = [NSDictionary
dictionaryWithContentsOfFile:@"appName.app/Contents/Resources/
template.plist"];

This only seems to work when I run it from Project Builder.

It also works if I place template.plist on my desktop and reference it
from there.

I know I must be overlooking something simple.

-Alex P.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Referencing Files within a App (From: Marc Weil <email@hidden>)

  • Prev by Date: Re: Graceful Crash
  • Next by Date: Question about poseAsClass
  • Previous by thread: Re: Referencing Files within a App
  • Next by thread: Re: NSDocument's loadDataRepresentation called before the document UI is functional?
  • Index(es):
    • Date
    • Thread