UIWebViewDelegate

Is any using Jason King’s UIWebViewDelegate?

I have been unable to get it to work with 2018r4 & iOS 12… and I do not see what the problem might be… the app crashes when trying to setDelegate.

Thanks,
Jim

Hi Jim-

Probably the exact same issue as in this thread:

https://forum.xojo.com/conversation/post/422673

The underlying class is no longer a UIWebView so the delegate is no longer the right type either.

Hi Jason…

Yes, that looks like the issue.

Thanks

@James Meyer you can use the replacement HTMLViewerExtensionsXC , compatible with WKWebView, from @Jeremie Leroy here: iOSDesignExtensions

Thanks I will check that out.

Well actually HTMLViewerExtensionsXC from iOSDesignExtensions has different features than the UIWebViewDelegate

You can find WKNavigationDelegate here: https://github.com/jkleroy/iOSKit

OK… thanks.

In the built app when I try to display a “local” html page the Error event on WKNavigationDelegate fires and I get “The operation couldn’t be completed. Operation not permitted”.

By “local” I mean a file located in “SpecialFolder.Documents”… and using folderitem.URLPath… so it looks something like:

file:///var/mobile/Containers/Data/Application/2332332…/Documents/HTMLFiles/index.html

The Error event does not fire when I run in the debugger/simulator… it works as expected.

Is there anyway to get it to load that local file?

Thanks

See here https://forum.xojo.com/52439-ioshtmlviewer-loadurl-only-working-in-simulator

Thanks… that is working.