NSBundle getting location of file in bundle
NSBundle getting location of file in bundle
- Subject: NSBundle getting location of file in bundle
- From: Mark Bateman <email@hidden>
- Date: Thu, 5 Jun 2008 22:37:52 -0400
I'm currently hardcoding the file location just for debugging my app.
It works great.
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.
the full path i've been using on the simulator is
file:////Users/mark/Documents/Projects/FltPlan/PDA/AirportInfoPDA.htm
works well with:
[myWebView loadRequest:[NSURLRequest requestWithURL:[NSURL
URLWithString: url]]];
How do I form the correct path from the bundle location and use the
AppendString to add the file:// on the front as I can't get it to work
even when hard coding the strings using append.
_______________________________________________
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