Closed mlynch closed 8 years ago
work very smoothly on iPhone4S iOS 9.2 (13C75). I will try to log energy and cpu usage to compare with WebView.
Neat stuff @mlynch, @shazron. The recipe at the gist does work.
My initial comments are as follows:
<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.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?
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.
2) 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 ios@4.0.1
to solve the <icon>
issue.
3) 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 ios@4.0.1
again in order to have the correct xcode project name. Very strange.
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.
Thanks @5amfung!!! It helped me. update to 4.0.1 and img and splashscreen load correctly
cordova-plugin-wkwebview-engine breaks Cordova iOS 4.0.0 under iOS 8 https://issues.apache.org/jira/browse/CB-10269
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
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!
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 The crash-recovery is bad-news I highly recommend turning it off.
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?
Looks good so far! But live reload doesn't work anymore. Do you guys have an idea how I could fix it?
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!
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.