[TIMOB-20167] Windows: Platform.version on Windows 10
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Medium |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2016-01-10T04:36:49.000+0000 |
| Affected Version/s | Release 5.1.0 |
| Fix Version/s | Release 5.3.0 |
| Components | Windows |
| Labels | qe-5.3.0 |
| Reporter | Kota Iguchi |
| Assignee | Gary Mathews |
| Created | 2015-12-22T07:52:07.000+0000 |
| Updated | 2016-04-14T21:21:12.000+0000 |
Description
Ti.UI.Platform.version does not return valid OS version on Windows 10. It seems it's returning driver version or something now (on Surface Pro 3), so in the [PR 512](https://github.com/appcelerator/titanium_mobile_windows/pull/512) I've implemented it as returning fixed number "10.0" for a workaround.
Attachments
| File | Date | Size |
|---|---|---|
| Surface_Pro_3.png | 2016-01-04T00:39:04.000+0000 | 6617 |
| version.JPG | 2016-01-03T01:37:02.000+0000 | 29973 |
| winver_Surface_Pro_3.png | 2016-01-04T04:03:59.000+0000 | 31740 |
| winver.png | 2016-01-04T01:35:18.000+0000 | 56577 |
[~gmathews] No, it's [hard-coded](https://github.com/appcelerator/titanium_mobile_windows/blob/master/Source/Ti/src/Platform.cpp#L370) for now. Because our [old implementation](https://github.com/appcelerator/titanium_mobile_windows/blob/master/Source/Ti/src/Platform.cpp#L379) returns wrong value (like 1.1.523.0) on my Surface Pro 3.
I should have explained that I reverted that change and that is the result I get on a Windows 10 machine compiled as a Windows 10 app.
This is how it shows up under Windows 10 (Store app) on Surface Pro 3. !Surface_Pro_3.png|thumbnail! It runs good (returning 10.0.xxxx) under Windows 10 Mobile.
Just curious, what Windows version do you have on your Surface Pro 3? Run
winver!winver.png|thumbnail!ok, here's mine. Seems like same version. !winver_Surface_Pro_3.png|thumbnail!
PR: https://github.com/appcelerator/titanium_mobile_windows/pull/526 Thanks [~cwilliams]
Verified as fixed,
Ti.UI.Platform.versionreturns the correct version on windows 10 phone devices & emulators. Tested on: Windows 10 Pro Windows Phone 10.0 Device (Microsoft Lumia 640 LTE) Appc Studio: 4.6.0.201604141457 Ti SDK: 5.3.0.v20160414094426 Appc NPM: 4.2.5-1 Appc Core: 5.3.0-12 Node: v4.4.2 *Closing Ticket.*