I am trying to upload images from a package in uiwebview.
the code I'm using right now
NSString *path = [[NSBundle mainBundle] bundlePath]; NSURL *baseURL = [NSURL fileURLWithPath:path]; [webView loadHTMLString:htmlString baseURL:baseURL];
when I open the view, the application closes and opens the safari, and an error message appears: "Safari cannot open the file. Error:" file is directory ".
if I set baseURL to nil, then the page loads correctly (although without images).
Any suggestions?
source share