Reputation: 5405
I'm developing a PhoneGap HTML5 app, which is doing some image manipulation.
What I see is that the same script (http://fornace.io/jstests/gogh.html) is taking roughly 10x more time to execute inside Phonegap than in mobile Safari (from 5 seconds to about 45).
Since we all understood that iOS8 Webkit finally allowed all the apps to use the same Nitro engine as Safari, I wonder if someone can explain how this huge difference is still there, and if there's a workaround.
Upvotes: 7
Views: 4066
Reputation: 3550
Indeed, we have to wait for Cordova to support the new WKWebView. And Cordova needs to wait for Apple to release a fixed version of iOS.
In the meanwhile, I've created a plugin which let you use WKWebView as the default webview for Cordova apps. It includes a few fixes and workarounds for the blockers Cordova ran into.
Grab it while it's fresh at https://github.com/EddyVerbruggen/cordova-plugin-wkwebview
Upvotes: 3
Reputation: 12952
PhoneGap is still using UIWebView
because of a bug with WKWebView
, you will have to implement native app that will open your URL with WKWebView
for now until Phonegap moves to WKWebView
. Apparently the bug is with opening local files with WKWebView, if you want to open a URL in WKWebView, it is possible now.
Here is a webview test app that you can use to test your URL in WKWebView
and UIWebView
, and check performance:
https://itunes.apple.com/us/app/browser-resizer/id928647773?mt=8&at=10ltWQ
Upvotes: 2
Reputation: 6029
There are two different webviews as of iOS8. The standard UIWebView and the new WKWebView.
WKWebView is the one that will improve everything, but as the Cordova devs have explained in detail here, there is a bug where WKWebView does not allow loading of local files and therefore cannot be implemented with Cordova right now.
This explains the issue you are seeing. Apparently Apple is aware of the issue and if it gets resolved I would expect it to be implemented in Cordova after that time.
Upvotes: 6