Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23158] Windows: Use of native module for UWP 10.0 fails

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2016-04-11T20:37:34.000+0000
Affected Version/sRelease 5.3.0
Fix Version/sRelease 5.4.0
ComponentsWindows
Labelsn/a
ReporterKota Iguchi
AssigneeKota Iguchi
Created2016-04-06T09:32:33.000+0000
Updated2016-06-30T17:21:25.000+0000

Description

Enabling native module for Windows 10 app (--wp-sdk 10.0) causes build error. It is because Titanium CLI tries to link win10\x86|arm\XXX.lib but we don't build native module for win10 target. Let say you have created and installed your custom module named com.appcelerator.TIMOB23148.
var TIMOB23148 = require('com.appcelerator.TIMOB23148');

var win = Ti.UI.createWindow({backgroundColor:'green'});

win.addEventListener('open', function() {
	Ti.API.info(typeof TIMOB23148);
	Ti.API.info(Object.keys(TIMOB23148));
	Ti.API.info(typeof TIMOB23148.myproperty);
	Ti.API.info(typeof TIMOB23148.myfunction);
});
win.open();
This causes error when you build against --wp-sdk 10.0
ti build --platform windows --target ws-local --wp-sdk 10.0

[ERROR] LINK : fatal error LNK1181: cannot open input file 'C:\ProgramData\Application Data\Titanium\modules\windows\com.appcelerator.TIMOB23148\1.0.0\win10\x86\ComAppceleratorTIMOB23148.lib' [TitaniumWindows_Native.vcxproj]

Comments

  1. Kota Iguchi 2016-04-07

    https://github.com/appcelerator/titanium_mobile_windows/pull/610
  2. Ewan Harris 2016-06-30

    Verified using: Windows 10 Pro Ti SDK: 5.4.0.v20160630074247 Appc NPM: 4.2.7-2 Appc CLI: 5.4.0-23 Appc Studio: 4.7.0.201606220541 Using a native module on Windows 10 and Windows 10 Mobile now works Closing ticket

JSON Source