开发者

UIWebView Unsupported URL

I'm using a UIWebView that's using an offline HTML file to manage it's workflow. But, every time I tap on one of the items in the UIWebView the workflow is correct but I get a console message telling me that the URL is invalid.

The message is as follows:

{
    NSErrorFailingURLKey = "applewebdata://BA77B31A-D9ED-4883-84BB-4270BCBEECA5?selected#node-2866424";
    NSErrorFailingURLStringKey = "applewebdata://BA77B31A-D9ED-4883-84BB-4270BCBEECA5?selected#node-2866424";
    NSLocalizedDescription = "unsupported URL";
    NSUnderlyingError = "Error Domain=kCFErrorDomainCFNetwork Code=-1002 \"unsupported URL\" UserInfo=0x592ece0 {NSErrorFailingURLKey=applewebdata://BA77B31A-D9ED-4883-84BB-4270BCBEECA5?selected#node-2866424, NSErrorFailingURLStringKey=applewebdata://BA77B31A-D9ED-4883-84BB-4270BCBEECA5?selected#node-2866424, NSLocalizedDescription=unsupported URL}";
}

The error is quite clear, but I'm not completely sure where the error comes from, seeing that my URL is correct via the URI standard, as far as I know.

"applewebdata://BA77B31A-D9ED-4883-84BB-4270BCBEECA5?selected#node-2866424"

I don't know if there are differences between a normal HTTP URL and an AppleWebData URL, but this is correct according to the URI scheme.

e.g.:

scheme name:file name:query:fragmen开发者_JS百科t

Am I missing something here? I'd like to have my UIWebView do it's work without complaining about an incorrect URL, because the workflow is good. It does what I intended, but just not without being quiet.

Thanks in advance!

Bryan


Assuming you are loading this with loadHTMLString:, try setting the page's baseUrl as mentioned in this question: shouldStartLoadWithRequest appending link with applewebdata

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜