Re: NSBundle getting location of file in bundle
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