ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

WKWebView Tester Feedback

Open mlynch opened this issue 10 years ago • 14 comments

Help us test Ionic with new WKWebView support in Cordova! Instructions on how to try it out are here: https://gist.github.com/mlynch/c63205f114def01ed0b9.

Please leave any feedback in the comments below.

mlynch avatar Dec 09 '15 22:12 mlynch

work very smoothly on iPhone4S iOS 9.2 (13C75). I will try to log energy and cpu usage to compare with WebView.

dagatsoin avatar Dec 15 '15 16:12 dagatsoin

Neat stuff @mlynch, @shazron. The recipe at the gist does work.

My initial comments are as follows:

  • Probably the most used and needed CLI feature in our case is the live reload capability of "ionic run" on the command line and that does not seem to be working at this moment.
  • In the gist you specify <plugin name="cordova-plugin-whitelist" spec="1" /> but according to the info at http://cordova.apache.org/announcements/2015/12/08/cordova-ios-4.0.0.html, it seems that cordova-plugin-whitelist is NOT needed for cordova-ios-4.0.0. So something to check.

zarko-tg avatar Dec 16 '15 09:12 zarko-tg

Tried but got the following error:

The following build commands failed: CompileC build/Open-climb.build/Debug-iphonesimulator/Open-climb.build/Objects-normal/i386/Diagnostic.o Open-climb/Plugins/cordova.plugins.diagnostic/Diagnostic.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler (1 failure) Error: Error code 65 for command: xcodebuild with args: -xcconfig,~/oc/grades-cordova/platforms/ios/cordova/build-debug.xcconfig,-project,Open-climb.xcodeproj,ARCHS=i386,-target,Open-climb,-configuration,Debug,-sdk,iphonesimulator,build,VALID_ARCHS=i386,CONFIGURATION_BUILD_DIR=~/oc/grades-cordova/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=~/oc/grades-cordova/platforms/ios/build/sharedpch

Any ideas?

beachygreg avatar Dec 21 '15 00:12 beachygreg

I see 3 issues:

  1. Same compile error @beachygreg saw.

Run ionic plugin add cordova-plugin-camera@2. The issue is fixed in v2 but npm still has v1.2.

  1. Having <icon> in config.xml breaks.
<platform name="ios">
    <icon src="resources/ios/icon/icon.png" width="57" height="57"/>
   ...
</platform>

The path should be /Users/me/dev/myapp/resources/ios/icon/icon-60.png without config.xml.

cp: no such file or directory: /Users/me/dev/myapp/config.xml/resources/ios/icon/icon-60.png

The problem seems to be fixed in 4.0.1. Use ionic platform add [email protected] to solve the <icon> issue.

  1. I noticed in my platform directory, the xcode project name is called Hello Cordova.xcodeproj instead of my actual project name. It's weird and I don't know how the name is picked up.

I had to run cordova platform rm ios and then run cordova platform add [email protected] again in order to have the correct xcode project name. Very strange.

5amfung avatar Dec 23 '15 07:12 5amfung

Thanks @5amfung!

Now I get the following build error: The following build commands failed: CompileC build/Hello\ Cordova.build/Debug-iphonesimulator/Hello\ Cordova.build/Objects-normal/i386/Diagnostic.o Hello\ Cordova/Plugins/cordova.plugins.diagnostic/Diagnostic.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler (1 failure)

Looks like the diagnostics plugin does not compile... should I post on their github issues?

Thanks, Greg B.

beachygreg avatar Dec 31 '15 19:12 beachygreg

Thanks @5amfung!!! It helped me. update to 4.0.1 and img and splashscreen load correctly

DSergii avatar Jan 12 '16 14:01 DSergii

cordova-plugin-wkwebview-engine breaks Cordova iOS 4.0.0 under iOS 8 https://issues.apache.org/jira/browse/CB-10269

xiaody avatar Jan 14 '16 10:01 xiaody

Failed to install local web server, any ideas? thanks!

Failed to install 'cordova-labs-local-webserver':Error: Non-whitespace before first tag. Line: 0 Column: 1 Char:  at error (C:\Users\bob\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\sax\lib\sax.js:347:8) at strictFail (C:\Users\bob\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\sax\lib\sax.js:364:22) at Object.write (C:\Users\bob\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\sax\lib\sax.js:603:11) at XMLParser.feed (C:\Users\bob\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\elementtree\lib\parsers\sax.js:48:15) at ElementTree.parse (C:\Users\bob\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\elementtree\lib\elementtree.js:271:10) at Object.parse (C:\Users\bob\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\elementtree\lib\elementtree.js:584:8) at module.exports (c:\Projects\ionTone\source\vs2015\ndp2016\Client.Cordova.Ionic\plugins\cordova-labs-local-webserver\scripts\after_install.js:35:20) at runScriptViaModuleLoader (C:\Users\bob\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\hooks\HooksRunner.js:167:18) at runScript (C:\Users\bob\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\hooks\HooksRunner.js:145:16) at C:\Users\bob\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\hooks\HooksRunner.js:130:20 Error: Non-whitespace before first tag. Line: 0 Column: 1

yechongbo avatar Mar 01 '16 15:03 yechongbo

Hello! I have just integrated into an existing Ionic2 App and it has extremely lower the resources usage. In simulator (which consumes a little bit more than in real device) it has lower from something like ~100MB of memory usage to ~10MB. The CPU usage has lower too, it remains between ~5% and ~10% normal usage when it was something like ~20% ~25% with UIWebView. The peak when opening the App has also lower from something like ~80% ~90% to ~30%.

Awesome!

jorchg avatar Apr 05 '16 09:04 jorchg

Something worth taking a look at is Telerik WKWebView. It does not require iOS@4+. Also it is a one step solution implementing a local-webserver and crash-recovery. As an aside: IBM MobileFirst + ionic requires ios < 4 (and relies on lots of old code :-1: ), so the current proposed solution would not run (I tried and ended up with a build error: No visible @interface for 'xxxx') but the Telerik WKWebView was a drop in solution for me.

AceLondon avatar Apr 06 '16 13:04 AceLondon

@AceLondon The crash-recovery is bad-news I highly recommend turning it off.

lolsborn avatar May 19 '16 22:05 lolsborn

Well, it seems we cannot access the local files as medias etc... Plus my Crosswalk app isn't looking the same on WkWebView, why?

Btw, how to be sure WkWebView is on? My servers get "Mozilla/5.0 (iPhone; CPU iPhone OS 9_3 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Mobile/13E230" from emulator, is it good?

nux17 avatar Jul 12 '16 13:07 nux17

Looks good so far! But live reload doesn't work anymore. Do you guys have an idea how I could fix it?

0xclem avatar Jul 22 '16 06:07 0xclem

Hello all! I am going to close this issue for now as we have moved to https://github.com/driftyco/cordova-plugin-wkwebview-engine. Thanks for using Ionic!

jgw96 avatar Aug 19 '16 16:08 jgw96