• 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
NSBundle pathForResource:ofType:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSBundle pathForResource:ofType:


  • Subject: NSBundle pathForResource:ofType:
  • From: "Maryanna Rogers" <email@hidden>
  • Date: Mon, 13 Aug 2007 16:38:19 -0400

Hi,

This should be simple, but it's driving me crazy.

I can add a text file (foo.txt) resource to my app that's accessible through:

NSString* fPath = [[NSBundle mainBundle] pathForResource:@"foo" ofType:@"txt"];

I get a path. Good.

Now if I add a different type of file to my app resources (foo.xyz),
and try to get it:

NSString* fPath = [[NSBundle mainBundle] pathForResource:@"foo" ofType:@"xyz"]

It can't be found. Is there something special I should know about the
ofType: parameter?

That's the only thing I've changed?!

~m
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSBundle pathForResource:ofType:
      • From: j o a r <email@hidden>
  • Prev by Date: Re: Cocoa and PICT
  • Next by Date: Re: NSBundle pathForResource:ofType:
  • Previous by thread: Re: Expanding an NSMenuItem programmatically
  • Next by thread: Re: NSBundle pathForResource:ofType:
  • Index(es):
    • Date
    • Thread