I am trying to load any of the igDataChart samples into a WKWebView in an iOS or macOS app.
The HTML portion renders but the jquery portion never does.
Is there a way to load any of the igDataChart samples into a WKWebView in either an iOS or macOS app?
For example this is one that I tried but never got to work:
Can anyone advise how to load that HTML page into a WKWebView?
I assume you are following the approach that WKWebView requires, since you see the html part rendering. IF you happen to miss something from that, I see plenty of topics on Stackoverflow discussing how to add jQuery components to a WKWebView. like this one.
Do you see any errors coming from the jQuery part of the code ? Any screens or additional information will be helpful. Until that information is available, I can only assume that a possible reason is the needed resources are not loaded in the view, please make sure that you have correctly loaded those.
Hi Hristo An.
I uploaded the source code of my Xcode project to your support website -- if you can contact Michael DiFillipo from Infragistics WPF support, he has the code. Sorry, but I don't see a way to upload source code to the forum.
Let me know if you have problems getting the source code and I will figure out another way to get it to you.
And no, I don't see any errors about the JQuery code.
The sample you posted uses an obsolete UIKit control (UIWebView), the current control to use is WKWebView (from WebKit)
I have provided my Xcode project to Michael DiF in the WPF support team, can you contact him to get it?
I don't know how to upload source code to the forum.
I don't see any error in the output when I run on either a device or the iOS simulator using Xcode.
Also, the sample you linked is quite old, UIWebView is no longer used.
Now it is WKWebView (from WebKit) -- this is what my sample project is using.
Let me know if you cannot get the source from Michael DiF and I will try to figure out another way to get it to you.
Sure, I will get the code you have uploaded to our support system One question that I have meanwhile is - Do you mean that getting the https://www.igniteui.com/data-chart/binding-json-data and putting it in your app renders the chart correctly in Safari on macOS, but does not in a iOS app ?
I did some research, and it looks like that you would need to manually inject the Javaxscript codeto be executed in the WKWebView.
Here are some resouces on that:
WKWebView advanced tutorial