My problem: The ionic application that I am developing is terribly slow to learn that UIWebView is the culprit, I am looking for ways to speed it up, and WKWebView is the most promising solution.
What my project looks like: When setting up a sample ion project (e.g. http://ccoenraets.imtqy.com/ionic-tutorial/install-ionic.html ) with the current CLI Cordova 4.1.0 (I use Ionic 1.2.4) UIWebView is used as the default. However, starting in Cordoba 4, the new and fast WKWebView is ready-made and can be forced, at least in iOS 9 ( cordova 4 supports WKWebView ).
The plugin I used and configured: via cordova plugin add cordova-plugin-wkwebview-engine support is added for the iOS platform (it is now available 9.3). When this plugin is added and configured correctly in the config.xml file with
<feature name="CDVWKWebViewEngine"> <param name="ios-package" value="CDVWKWebViewEngine" /> </feature> <preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
What I have tried so far: In the ionic build ios terminal, after this, the assembly is successful, and when installing the application through XCode 7.3 on OS X El Capitan 10.11.3, the message Using WKWebView is printed in the console Using WKWebView , but then immediately after the splash screen the container appears apps in white screen of death. As soon as I remove this plugin, UIWebView is used and the application works as expected.
Alternative: replacing the original wkwebview-engine-localhost plugin using the built -in localhost . As I understand it, WKWebview should be supported cordless and ionic right out of the box, without relying on some kind of “plug-in for laboratories” with an integrated server that was designed to support iOS 8, which I do not need. I understand that WKWebView has some limitations compared to the old UIWebView, especially when it comes to processing file:// statements of known problems , but there must certainly be someone there who received Ionic + Cordova WKWebView, working without any hassle, which there were me, right? There should be better ways to achieve a simple speed improvement for web browsing.
I probably tried every solution, configuration, combination of plugins, downgrading cordova cli (minimum 4.0.0 to support WKWebView), clearing caches and rebooting and rebooting my device, new installation and reading of platforms and updating the cord, npm, various plugins, but they all did nothing to help except the apache labs plugin above or seemed like a huge mess that didn't change anything.
When remote debugging an ios application on a device through my local Safari, I see in the element tree that the body tag is either empty or a simple "ng-view" placeholder for the angular element is displayed, I will fix that there should be a problem with extracting / angular files scripts through the way that cordova through WKWwebView processes it?
Note. The application itself works fine either with ionic serve or ionic emulate ios , only when deployed to a real device via Xcode (since ionic run ios does not work, but that's another story) a white screen appears.
Any help is greatly appreciated as it seems to me that I need to either use the localhost + wkwebview plugin or let users suffer from poor speed.
Thank you so much!