- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Using Intel XDK 192
I'm having a hard time troubleshooting some issues with Cordova for both Android and iOS. Some things don't work on the app preview but work on the device, and some things work on the device but not app preview. Additionally, some things work for Android on the device but not iOS.
One particular problem for iOS I can see that my project file specifies the Cordova version for iOS as the latest 4.1.2, however the dub log shows cordova version 3.6.0 when I run in the emulator. When I push files and run in "Test" mode the debugger shows version 3.5.0. I suspect the same thing is going on with the plugins which is causing my problems.
What gives?
Why 3 different versions.. how can I consistently Test my code? What version of Cordova would actually be included if I built for Android and iOS?
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When you build your app, the version you see in the Projects settings will be included. Where do you see different version in emulator? can you send a screenshot? Which plugins are you trying to use? Please specify what works in Android that does not work in iOS.
Swati
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So forget about Android for a minute, just trying to test on iOS, I have 4 different versions of Cordova displayed.
Here is what is defined in my project build settings under the iOS tab. You can see that it is set to Cordova version 4.1.2
When I run my app in the Emulator as an iPhone 6, the Info says Cordova 2.9, but the emulated App says Cordova 3.6.0
And when I push my build to the Test server and run on my iPhone 6 using the intel App preview
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Let's forget about Android for a minute. Just with testing for iOS, between all the screens and devices I see 4 different Cordova versions.
This is what I have defined in my project build settings under the iOS tab
Here is what displays when I run through the emulator. Notice how it says iPhone 6 + Cordova 2.9? But the Emulator shows I'm running Cordova 3.6.0
And when I push my code to the Test server and run it through the Intel App Preview on my iPhone it shows that Cordova version is 3.5.0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Last night I built the app for Android, when I downloaded the apk file and installed it on my Android it showed Cordova version 3.6.1
There is just no consistency at all with Cordova versions that are shown in the Intel XDK, this makes troubleshooting issues nearly impossible.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Adam,
Thanks for bringing this to our attention. I see exactly as your screenshots.
I have reported the bug. As per my understanding though the build uses the version you selected in Projects tab. Will check with the build engineers and confirm.
Swati
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is not a bug, per se, but a reflection of the difficulty in keeping different components in sync and the unfortunate naming convention that the Cordova project recently took on regarding versions.
The version you put into the build screen reflects the "Cordova CLI" version that the build system uses. Each CLI version comes with a "pinned" Cordova framework version, which can vary as a function of the target platform. For example, if you look at the recently released Cordova CLI 5.0 platforms spec file (https://github.com/apache/cordova-lib/blob/5.0.x/cordova-lib/src/platforms/platformsConfig.json) it comes with Android Cordova 4.0.0, iOS 3.8.0, etc. Here's the link for CLI 4.1.2 (https://github.com/apache/cordova-lib/blob/4.1.2/cordova-lib/src/cordova/platformsConfig.json -- they moved things around) and it supports Android Cordova 3.6.4, iOS Cordova 3.7.0, Windows 8 Cordova 3.7.1
That means that the Cordova framework version you report on device will not match the number that is in the CLI field when you specify a build. Technically, the Cordova framework can be updated within a given CLI version, but our build system only uses the version that was "pinned" when the CLI tools were released.
The reason you see differences between the Emulate tab and App Preview and your built app is:
-- Emulate tab has one specific version it is built to, we try to make that match the then current version of Cordova at the time of that release of the XDK, but that is not guaranteed.
-- App Preview is released independently of the XDK (and the Emulate tab) and, therefore, may also vary. Again, we try to make it close to the version that is present in the XDK at the time it is released, but since they do not release in perfect sync, that is not always possible.
-- Your app runs with the version of Cordova that is determined by the CLI version you chose when you built it.
-- One additional variable, the version of the Cordova framework that is built into Crosswalk builds is determined by the Crosswalk project, not by the XDK. There is a fair amount of customization by the Crosswalk project team that takes place to do this, and they generally release each Crosswalk version with the then current version of the Android Cordova framework.
Does this matter? Not that much. There are some issues that come up that are related to the Cordova framework version number, but they tend to be very few and far between. The majority of the code and compatibility issues you will experience in your app have more to do with the webview on the target device than the Cordova framework and the versions and mix of Cordova plugins you choose to use. See this blog for more details about what a webview is and why that matters: http://blogs.intel.com/evangelists/2014/09/02/html5-web-app-webview-app/.
p.s. That 2.9 version reported by the Emulate tab config panel is a bug, it is a remnant of the original Ripple Emulator on which this tab is based and should not be reporting that version number.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Paul, thank you for the clarification that makes sense. I'm not so much worried about the version as much as I was about troubleshooting a bug. There seems to be a bug with how xdk includes the proper cordova plugins, because if I add / remove plugins from my project then strange things happen. For instance in my current project I cannot get the cordova device to work on ios in app preview. However if I create a new project from the template it works correctly.
I will continue to look at the bug and not at the version of cordova so much.
Thank you!
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page