Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25885] Windows: Add "Ti.Platform.ostype" support

GitHub Issuen/a
TypeImprovement
PriorityLow
StatusClosed
ResolutionInvalid
Resolution Date2018-03-19T22:42:09.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsWindows
Labelsarchitecture, windows
ReporterJoshua Quick
AssigneeKota Iguchi
Created2018-03-19T21:14:39.000+0000
Updated2018-03-19T22:42:09.000+0000

Description

*Summary:* On Windows, the Ti.Platform.ostype property returns an empty string. [PlatformModule.cpp#L100](https://github.com/appcelerator/titanium_mobile_windows/blob/7b0db6e247c1662c535b2e4bd3f0c141ae95a5a0/Source/TitaniumKit/src/PlatformModule.cpp#L100) It should return one of the following to match Android and iOS' behavior: * "32bit" * "64bit" It's okay to make the 32-bit or 64-bit determination based on the app you're running instead of the architecture of the OS. This is how it's done on iOS. [APSUtility.m#L15](https://github.com/appcelerator/aps_sdk/blob/195633dd10a37d96ecf52be35c0c712dff5ef331/ios/support/analytics/APSAnalytics/APSUtility.m#L15) *Note:* The APS library provides CPU architecture (ex: "arm", "x86", etc.) for "ostype" when recording analytics. This does not match Android and iOS' behavior. We should not duplicate this issue on the Titanium side.

Comments

  1. Joshua Quick 2018-03-19

    Also note that I'm bringing this up because Android is currently/wrongly hard-coded to return "32bit" and we have a customer who wants to correctly identify the platform as shown here: [TIMOB-25877]
  2. Ewan Harris 2018-03-19

    Same as TIMOB-25884, the Windows implementation is here https://github.com/appcelerator/titanium_mobile_windows/blob/7b0db6e247c1662c535b2e4bd3f0c141ae95a5a0/Source/Ti/src/Platform.cpp#L292-L304
  3. Joshua Quick 2018-03-19

    Oh shoot. Well if this is the case, then we can close this ticket out.
  4. Joshua Quick 2018-03-19

    Already implemented.

JSON Source