• 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: NSBundle getting location of file in bundle
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSBundle getting location of file in bundle


  • Subject: Re: NSBundle getting location of file in bundle
  • From: "David Wilson" <email@hidden>
  • Date: Thu, 5 Jun 2008 22:55:22 -0400

On Thu, Jun 5, 2008 at 10:37 PM, Mark Bateman
<email@hidden> wrote:
> I'm now trying to use NSBundle to insert the resource location string for a
> webview. I'm using locally stored content inside the app bundle.  I tried
> using:
>
> NSMutableString *url;
> url = [NSBundle pathForResource: @"AirportInfoPDA"];
>
> I can't tell if this returns the full path including the filename &
> extension as the program now crashes.

There's no such method for NSBundle. Take a look at the API for the
NSBundle class- you need one of the pathForResource:ofType: methods.
You probably want:

url = [[NSBundle mainBundle] pathForResource:@"AirportInfoPDA"
ofType:@"extension"];

--
- David T. Wilson
email@hidden
_______________________________________________

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

References: 
 >NSBundle getting location of file in bundle (From: Mark Bateman <email@hidden>)

  • Prev by Date: Re: NSBundle getting location of file in bundle
  • Next by Date: Re: DTrace probe problem
  • Previous by thread: Re: NSBundle getting location of file in bundle
  • Next by thread: Multi Dock
  • Index(es):
    • Date
    • Thread