Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23557] Windows: target win sdk attribute in timodule.xml

GitHub Issuen/a
TypeNew Feature
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2016-06-30T23:13:38.000+0000
Affected Version/sRelease 5.3.0
Fix Version/sRelease 6.0.0
ComponentsWindows
Labelsn/a
ReporterKota Iguchi
AssigneeKota Iguchi
Created2016-06-27T06:58:28.000+0000
Updated2017-08-17T04:18:27.000+0000

Description

Currently timodule.xml in Windows module project is not used at all. But in order to align with how it's used in other platforms, we may need to have a way to specify target Windows sdk version attribute in it. To be specific, to align with other platform attributes, it would be <uses-sdk targetSdkVersion="10.0" />.
<windows>
  <manifest>
    <uses-sdk targetSdkVersion="10.0" />
  </manifest>
</windows>
When targetSdkVersion is specified, Windows module build should take the value as target Windows sdk version. Currently Windows 10 support is built by default whenever Windows 10 sdk is available, but you should be able to remove it by explicitly specifying 8.1 for it. *Steps*
> appc new -n test --id com.example.test
> cd test/windows
Then update timodule.xml to explicitly specify 8.1.
<windows>
  <manifest>
    <uses-sdk targetSdkVersion="8.1" />
  </manifest>
</windows>
Then build the module and make sure packaged zip doesn't contain win10 folder in it.
appc ti build -p windows --build-only

Comments

  1. Christopher Williams 2016-06-30

    TEST CASE
       appc new -t timodule -n testModule --id com.test.module
       cd testModule\windows
       appc ti build -p windows --build-only
       
       <windows>
         <manifest>
           <uses-sdk targetSdkVersion="8.1" />
         </manifest>
       </windows>
       
  2. Ewan Harris 2016-08-30

    [~kota] Was 10.0 not implemented? When trying to set 10.0 as the value I'm still seeing 8.1 being built
  3. Kota Iguchi 2016-08-30

    [~eharris] Let me check again, but yes, as I remember it's how it's supposed to work. When you target to 10.0, you should see phone(8.1), store(8.1), win10 folder in module archive. It's because Windows 10 is able to launch Windows Store/Phone 8.1 app as kind of compatibility mode, and Titanium is able to launch Phone/Store 8.1 app on Windows 10 when you specify --wp-sdk 8.1. So even when you target to build for Windows 10, we should consider building for 8.1 too because it could be linked to the 8.1 project too (even when it is built only for Windows 10).
  4. Ewan Harris 2016-09-02

    Thanks for the clarification [~kota], closing ticket Verified using: OS: Windows 10 Pro Appc core: 6.0.0-37 Appc NPM: 4.2.8-6 Ti SDK: 6.0.0.v20160901034311 When specifying 8.1 for the win SDK attribute in the tiapp.xml only 8.1 libraries are built. When specifying 10.0 both the 10.0 and 8.1 libraries are built. If an invalid input is entered then the CLI will default to building both Closing ticket

JSON Source