Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25884] Windows: Add "Ti.Platform.architecture" support

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

Description

*Summary:* On Windows, the Ti.Platform.architecture property returns an empty string. [PlatformModule.cpp#L30](https://github.com/appcelerator/titanium_mobile_windows/blob/7b0db6e247c1662c535b2e4bd3f0c141ae95a5a0/Source/TitaniumKit/src/PlatformModule.cpp#L30) It should return the same CPU architecture strings that our APS library uses when collection analytics. Either call the APS library's method or copy and paste the code into the Windows Titanium code. [Analytics.cs#L174](https://github.com/appcelerator/aps_sdk/blob/195633dd10a37d96ecf52be35c0c712dff5ef331/windows/Analytics.cs#L174) *Note:* Ideally, we should return a more descriptive string when running on an ARM processor. On iOS, we return the following architecture strings: * arm * armv6 * armv7 * armv7s * arm64 * x86_64 * i386 Odds are the "arm" string will never be returned on iOS and will tend to return "armv7", "armv7s", or "arm64". [APSUtility.m#L24](https://github.com/appcelerator/aps_sdk/blob/195633dd10a37d96ecf52be35c0c712dff5ef331/ios/support/analytics/APSAnalytics/APSUtility.m#L24)

Comments

  1. Ewan Harris 2018-03-19

    [~jquick] Windows does implement this, see https://github.com/appcelerator/titanium_mobile_windows/blob/7b0db6e247c1662c535b2e4bd3f0c141ae95a5a0/Source/Ti/src/Platform.cpp#L71-L89 The Windows architecture is different to the rest, TitaniumKit is intended to be a common cross-platform C++ layer that stubs all APIs and implements those that can be done in a cross platform way. So your link points to the stub, and the link I've provided implements the Windows specific APIs to determine this (I'm sure Kota can explain this 100x better than I can :) )
  2. Joshua Quick 2018-03-19

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

    Already implemented.

JSON Source