Try using NSURL's fileURLWithPath:, you won't need to preappend "file://".

On Jun 5, 2008, at 8:37 PM, Mark Bateman wrote:

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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to