• 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
Referencing files in the app's bundle
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Referencing files in the app's bundle


  • Subject: Referencing files in the app's bundle
  • From: David H <email@hidden>
  • Date: Sat, 27 Jul 2002 22:25:51 +1000

Hi all, I'm trying to reference a file contained in the app's bundle (an XML file to be loaded into a NSDictionary object). The file is located in "MyApp.app/Contents/Resources/dict.xml", and if I use that path as is in my code, the file is loaded successfully in Project Builder, but if I move the app out to the Applications or any other directory, the XML file fails to load. Is there some way to reference files inside the bundle, ie. "~/Contents/Resources/dict.xml" or equivalent?

http://digital.yahoo.com.au - Yahoo! Digital How To
- Get the best out of your PC!
_______________________________________________
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.

  • Follow-Ups:
    • Re: Referencing files in the app's bundle
      • From: Philip George <email@hidden>
  • Prev by Date: Re: Asynchronous I/O using NSFileHandle
  • Next by Date: Menu Extras in Jaguar
  • Previous by thread: Fwd: Creating Parent and Child CFXMLNodesRefs
  • Next by thread: Re: Referencing files in the app's bundle
  • Index(es):
    • Date
    • Thread