[TIMOB-23405] Windows: Ti.Platform.version returns an unexpected value
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | None |
Status | Resolved |
Resolution | Hold |
Resolution Date | 2016-06-09T05:11:47.000+0000 |
Affected Version/s | Release 5.3.0 |
Fix Version/s | n/a |
Components | Windows |
Labels | qe-5.3.0 |
Reporter | Josh Longton |
Assignee | Gary Mathews |
Created | 2016-05-17T23:11:51.000+0000 |
Updated | 2016-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
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?
PR: https://github.com/appcelerator/titanium_mobile_windows/pull/738
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?
PR looks good. Hold until we get more feedback from people internally/externally about this before we go hacking the version string.