I have a webview in my iPhone application, and I also have some html files inside my Resources folder. When my app loads, I load in a page from my resources into my webview.
Maybe it does have something to do with the baseurl: when I load the resources, I use this line:
[webView loadData:htmlData MIMEType:@"text/html" textEncodingName:@"UTF-8" baseURL:[NSURL URLWithString:@""]];
see at the end, it says baseURL: "". If I take this out, it doesn't work (crashes), but I don't know the path to my resources. If somebody does.....?
Try loading OtherPage.html first. If you can't then it's not there, and you've missed some part of adding it to the project. If you can, then there may just be a typo in the link, or the baseURL could be incorrect, as stated by August. When I created an html file with images in it that were in the resource file, it worked fine just using
<img src="file.png">
Take a look at how Phonegap does it. Here's their tutorial on local resources on the iPhone. Step 11 might be what you're neglecting.
I fixed it: I used this for the BaseURL like August said:
NSString *path = [[NSBundle mainBundle] bundlePath];
NSURL *baseURL = [NSURL fileURLWithPath:path];
Thank you!