Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23405] Windows: Ti.Platform.version returns an unexpected value

GitHub Issuen/a
TypeBug
PriorityNone
StatusResolved
ResolutionHold
Resolution Date2016-06-09T05:11:47.000+0000
Affected Version/sRelease 5.3.0
Fix Version/sn/a
ComponentsWindows
Labelsqe-5.3.0
ReporterJosh Longton
AssigneeGary Mathews
Created2016-05-17T23:11:51.000+0000
Updated2016-06-09T05:11:47.000+0000

Description

Ti.Platform.version returns an unexpected value on windows. *Steps to reproduce:*

Use the app.js below

Run the application and check either the logs or the window

*app.js*
Titanium.UI.setBackgroundColor('#000');

var win = Titanium.UI.createWindow({  
    title:'',
    backgroundColor:'#fff'
});
var defaultLabel = Ti.Platform.version;
var label = Titanium.UI.createLabel({
    color:'#999',
    text: defaultLabel,
    font:{fontSize:20,fontFamily:'Helvetica Neue'},
    textAlign:'center',
    width:'auto'
});
Ti.API.info(Ti.Platform.version);


win.add(label);

win.open();
*Actual :*
6.3.9651.0
*Expected:*
8.1

Comments

  1. Christopher Williams 2016-05-18

    So this is kind of a quirk of Windows OS, where I'm not sure of the correct behavior. Basically when asked, Windows gives build versions that don't match expectations with regards to the OS name. You can look at https://en.wikipedia.org/wiki/List_of_Microsoft_Windows_versions to get an overview, but basically 6.2.x means Windows 8.0, 6.3.x means Windows 8.1, and 10.0.x means Windows 10. Presumably we'd want to expose the real version number we got from the OS (which is what we do), though certainly for 8.1 this is confusing. Do we mangle the version from 6.3.x to 8.1.x?
  2. Gary Mathews 2016-06-06

    PR: https://github.com/appcelerator/titanium_mobile_windows/pull/738
  3. Kota Iguchi 2016-06-08

    Per [PR #738](https://github.com/appcelerator/titanium_mobile_windows/pull/738) cc [~jlongton] {quote} So first, I'm not even sure we should be doing this. I understand it's confusing that Windows reports the version as 6.3.x for Windows 8.1 - but that's what they do. I think we should surface the version as they report it, even though their "marketing" version differs. But, if the consensus generally is to hack the version, then yeah we should keep the build number at the end. But, I'd argue we should get more feedback from people internally/externally about this before we go hacking the version string. {quote} Should we resolve this as "Won't Do" for now?
  4. Kota Iguchi 2016-06-09

    PR looks good. Hold until we get more feedback from people internally/externally about this before we go hacking the version string.

JSON Source