{ "id": "138521", "key": "TIMOB-17911", "fields": { "issuetype": { "id": "6", "description": "gh.issue.epic.desc", "name": "Epic", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "16723", "description": "Windows Platform Support, ListView updates, Vector overlays in maps", "name": "Release 4.1.0", "archived": false, "released": true, "releaseDate": "2015-07-08" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-06-12T13:30:06.000+0000", "created": "2014-10-24T22:02:06.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "merge-3.4.2" ], "versions": [], "issuelinks": [ { "id": "51240", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "159343", "key": "TIMOB-23157", "fields": { "summary": "Windows: Building native module using \"appc ti\" fails", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "51242", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "159344", "key": "TIMOB-23158", "fields": { "summary": "Windows: Use of native module for UWP 10.0 fails", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "51418", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "159706", "key": "TIMOB-23241", "fields": { "summary": "Windows: logging from native module doesn't work", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "51226", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "159311", "key": "TIMOB-23148", "fields": { "summary": "Windows: Native module How-To documentation", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } }, { "id": "46605", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "143701", "key": "TIMOB-18467", "fields": { "summary": "Windows: Allow Usage of JavaScript against Native Windows APIs", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "6", "description": "gh.issue.epic.desc", "name": "Epic", "subtask": false } } } } ], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-31T22:01:29.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "12642", "name": "Windows", "description": "Windows authoring support" } ], "description": "This encompasses a few sub-items:\r\n\r\n* Prove that we can build ti.cloud, ti.map and ti.facebook-type modules\r\n* Create a default project structure for new modules\r\n* Add CLI tooling to create these modules\r\n* Hook up Studio to create new module projects.", "attachment": [], "flagged": false, "summary": "Windows: Implement Native module support", "creator": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 420, "state": "closed", "name": "2015 Sprint 12 Windows", "startDate": "2015-06-07T01:15:19.706Z", "endDate": "2015-06-21T01:15:00.000Z", "completeDate": "2015-06-20T23:02:18.410Z", "originBoardId": 144 } ], "comment": { "comments": [ { "id": "351972", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "[~gmathews] Please open up a handful of tickets to roughly correspond to steps we'd need to take to support native modules/DLLs for Windows similar to how we would for iOS/Android. This will likely involve work on the CLI/build to reference the modules and link them up during the build.", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2015-05-07T22:36:51.000+0000", "updated": "2015-05-07T22:36:51.000+0000" }, { "id": "381429", "author": { "name": "buder", "key": "buder", "displayName": "Jörgen Buder", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hi\r\n\r\nI need to create a couple of modules for Windows Phone support and it seems the direct API access sis not working for me in this case, so how do I create the module you have resolved above? I cannot find any docs o this.. thanks\r\n\r\nAny module template and CLI commands needed to build and hook in the module would be fine (we have created natives for iOS and Android so I get the general picture here )\r\n\r\nthanks", "updateAuthor": { "name": "buder", "key": "buder", "displayName": "Jörgen Buder", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-04-04T09:15:54.000+0000", "updated": "2016-04-04T09:15:54.000+0000" }, { "id": "381441", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "[~bimmel] Can we document how to build and use modules for Windows as part of the Windows-focussed 5.3 release?", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2016-04-04T11:17:07.000+0000", "updated": "2016-04-04T11:17:07.000+0000" }, { "id": "381701", "author": { "name": "buder", "key": "buder", "displayName": "Jörgen Buder", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hi\r\n\r\nI have tried basically everything now, from using the build script to trying the build command line from the github repo of Windows describing how to set up and create a module, nothing really results in a module useable. If I use the terminal build line like this:\r\n\r\nZ:\\Users\\jorgenbuder\\Documents\\Appcelerator_Studio_Workspace\\extwin2\\windows>ti\r\nbuild --platform windows --target wp-emulator --device-id 8-1-1 --win-publisher-\r\nid 00000000-0000-1000-8000-000000000000\r\n\r\nI get a zip file but it only contains a hip file the rest is skipped and not even build.\r\n\r\nIf I try to use the ./build_and_test.sh the project seems to build but there is not modules/ tree or zip file I can use to include in my project, is you can please let me know here asap how to do this I can write you new docs on this that you can get into the github repo or docs, just give me a hint on how to do this. \r\n\r\nIf you have time Fokke, please try this out, I use Phone 8.1 and the latest CLI..\r\n\r\nI created the module with :\r\n\r\nZ:\\Users\\jorgenbuder\\Documents\\Appcelerator_Studio_Workspace\\extwin2\\windows>ti\r\nbuild --platform windows --target wp-emulator --device-id 8-1-1 --win-publisher-\r\nid 00000000-0000-1000-8000-000000000000\r\n\r\nif I do not supply the name and id then the entry test crashes... so this was the only way..\r\nthanks guys", "updateAuthor": { "name": "buder", "key": "buder", "displayName": "Jörgen Buder", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-04-05T06:52:59.000+0000", "updated": "2016-04-05T06:52:59.000+0000" }, { "id": "381737", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "There's a useful Q&A in Stack Overflow: [How to call a method added to the windows native module of Appelerator Platform|http://stackoverflow.com/questions/36213930/how-to-call-a-method-added-to-the-windows-native-module-of-appelerator-platform/36214120#36214120] However we don't have any document about this yet. I'll file a new ticket for this.", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-04-05T12:18:20.000+0000", "updated": "2016-04-05T12:18:20.000+0000" }, { "id": "381739", "author": { "name": "buder", "key": "buder", "displayName": "Jörgen Buder", "active": true, "timeZone": "Europe/Berlin" }, "body": "Unfortunately the stack overflow does not work either unless you just updated it. It does not tell the correct way, it references to the github repo witch states things not needed anymore, like the cloning of ti windows, and git submodule update that do not work. Creating a module is also very hard as the CLI does not take entry, I had to put name and id as variables.\r\n\r\nAlso then building is not clear, do I build as in the gitrepo or as in the ./build_and_test script, either way no one generates a valid zip module to be used. The command line build in github gives only a empty module zip file without any dll or lib, the build script builds but do not generate any zip file\r\n\r\nAny suggestions o how to get from build script to useful module ? \r\n\r\nAlso I do not know as states in the stack overflow exactly where to put the function description that you mentioned last. I will have a look at the SDK but I will have to do that later...\r\n\r\nANY help just to get this up and running is great and I can help writing docs..\r\n\r\n/Jörgen", "updateAuthor": { "name": "buder", "key": "buder", "displayName": "Jörgen Buder", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-04-05T12:45:02.000+0000", "updated": "2016-04-05T12:45:02.000+0000" }, { "id": "381740", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "I remember following CLI command worked for me. I'll give it a try again and create new ticket if it has issues.\r\n\r\n{code}\r\ncd MY_WORKSPACE\r\nti create -p windows -t module\r\ncd MY_MODULE_NAME/windows\r\nti build -p windows -T ws-local\r\n{code}", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-04-05T13:05:12.000+0000", "updated": "2016-04-05T13:05:12.000+0000" }, { "id": "381754", "author": { "name": "buder", "key": "buder", "displayName": "Jörgen Buder", "active": true, "timeZone": "Europe/Berlin" }, "body": "I tried exactly this, did not work at all, or let me refrase, it constructs a zip file but it is useless as it only contains the hpp file, there is no building taking place... :(\r\n\r\n", "updateAuthor": { "name": "buder", "key": "buder", "displayName": "Jörgen Buder", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-04-05T15:18:14.000+0000", "updated": "2016-04-05T15:18:14.000+0000" }, { "id": "381756", "author": { "name": "buder", "key": "buder", "displayName": "Jörgen Buder", "active": true, "timeZone": "Europe/Berlin" }, "body": " Name = Microsoft Windows 8.1 Pro\r\n Version = 6.3.9600\r\n Architecture = 32bit\r\n # CPUs = 4\r\n Memory = 4294488064\r\n\r\nNode.js\r\n Node.js Version = 0.12.7\r\n npm Version = 2.11.3\r\n\r\nTitanium CLI\r\n CLI Version = 4.1.0-dev\r\n\r\nTitanium SDK\r\n SDK Version = 5.2.1.GA\r\n SDK Path = C:\\Users\\jorgenbuder\\Library\\Application Support\r\n\\Titanium\\mobilesdk\\win32\\5.2.1.GA\r\n Target Platform = windows\r\n\r\nCommand\r\n node C:\\Users\\jorgenbuder\\AppData\\Roaming\\npm\\node_modules\\titanium\\bin\\titani\r\num build -p windows -T ws-local\r\n\r\n--- WindowsModuleBuilder loginfo\r\n[INFO] Visual Studio version: 12.0\r\n[INFO] MSBuild version: 12.0.31101.0\r\n[INFO] Project directory: Z:\\Users\\jorgenbuder\\Documents\\Appcelerator_Studio_Wo\r\nrkspace\\extwin2\\windows\r\n[INFO] Skipping Z:\\Users\\jorgenbuder\\Documents\\Appcelerator_Studio_Workspace\\ex\r\ntwin2\\windows\\WindowsPhone.ARM\\ComTestwinSe.sln\r\n[INFO] Skipping Z:\\Users\\jorgenbuder\\Documents\\Appcelerator_Studio_Workspace\\ex\r\ntwin2\\windows\\WindowsPhone.Win32\\ComTestwinSe.sln\r\n[INFO] Skipping Z:\\Users\\jorgenbuder\\Documents\\Appcelerator_Studio_Workspace\\ex\r\ntwin2\\windows\\WindowsStore.ARM\\ComTestwinSe.sln\r\n[INFO] Skipping Z:\\Users\\jorgenbuder\\Documents\\Appcelerator_Studio_Workspace\\ex\r\ntwin2\\windows\\WindowsStore.Win32\\ComTestwinSe.sln\r\n[DEBUG] Skipping Z:\\Users\\jorgenbuder\\Documents\\Appcelerator_Studio_Workspace\\ex\r\ntwin2\\windows\\WindowsPhone.ARM\r\n[DEBUG] Skipping Z:\\Users\\jorgenbuder\\Documents\\Appcelerator_Studio_Workspace\\ex\r\ntwin2\\windows\\WindowsPhone.Win32\r\n[DEBUG] Skipping Z:\\Users\\jorgenbuder\\Documents\\Appcelerator_Studio_Workspace\\ex\r\ntwin2\\windows\\WindowsStore.ARM\r\n[DEBUG] Skipping Z:\\Users\\jorgenbuder\\Documents\\Appcelerator_Studio_Workspace\\ex\r\ntwin2\\windows\\WindowsStore.Win32\r\n[INFO] Creating zip: com.testwin.se-windows-1.0.0.zip\r\n[DEBUG] Packing: \"modules\\\\windows\\\\com.testwin.se\\\\1.0.0\\\\assets\\\\README\"\r\n[DEBUG] Packing: \"modules\\\\windows\\\\com.testwin.se\\\\1.0.0\\\\documenation\\\\index.m\r\nd\"\r\n[DEBUG] Packing: \"modules\\\\windows\\\\com.testwin.se\\\\1.0.0\\\\example\\\\app.js\"\r\n[DEBUG] Packing: \"modules\\\\windows\\\\com.testwin.se\\\\1.0.0\\\\include\\\\ComTestwinSe\r\n.hpp\"\r\n[DEBUG] Packing: \"modules\\\\windows\\\\com.testwin.se\\\\1.0.0\\\\LICENSE\"\r\n[DEBUG] Packing: \"modules\\\\windows\\\\com.testwin.se\\\\1.0.0\\\\manifest\"\r\n[DEBUG] Packing: \"modules\\\\windows\\\\com.testwin.se\\\\1.0.0\\\\timodule.xml\"\r\n[INFO] Done.\r\n\r\nZ:\\Users\\jorgenbuder\\Documents\\Appcelerator_Studio_Workspace\\extwin2\\windows>", "updateAuthor": { "name": "buder", "key": "buder", "displayName": "Jörgen Buder", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-04-05T15:27:19.000+0000", "updated": "2016-04-05T15:27:19.000+0000" }, { "id": "381838", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~buder] Thanks you for the logs. Looks like nothing is built on your environment. Could you run it with {{trace}} log enabled? {{ti build -p windows -l trace -T ws-local}}.\r\n", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-04-06T07:45:46.000+0000", "updated": "2016-04-06T07:45:46.000+0000" }, { "id": "381840", "author": { "name": "buder", "key": "buder", "displayName": "Jörgen Buder", "active": true, "timeZone": "Europe/Berlin" }, "body": "Please note that when I run the ./build_and_test script from command line it builds the full module project on Windows, but sure I will try it\r\n\r\n/Jörgen", "updateAuthor": { "name": "buder", "key": "buder", "displayName": "Jörgen Buder", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-04-06T07:56:42.000+0000", "updated": "2016-04-06T07:56:42.000+0000" }, { "id": "381841", "author": { "name": "buder", "key": "buder", "displayName": "Jörgen Buder", "active": true, "timeZone": "Europe/Berlin" }, "body": "With trace on, exact same output :(", "updateAuthor": { "name": "buder", "key": "buder", "displayName": "Jörgen Buder", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-04-06T07:57:49.000+0000", "updated": "2016-04-06T07:57:49.000+0000" }, { "id": "381842", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~buder] I see your Visual Studio project is built using {{Documents}} directory {{Z:\\Users\\jorgenbuder\\Documents\\Appcelerator_Studio_Workspace\\extwin2\\windows\\WindowsPhone.Win32}}, but Windows temporary directory should have been used in the latest Titanium CLI. (i.e. {{C:\\Users\\jorgenbuder\\AppData\\Local\\Temp\\com.testwin.se\\}}). Could you update your CLI?\r\n\r\nI usually do like below to update CLI and SDK:\r\n\r\n{code}\r\n$ appc setup\r\n$ npm install -g titanium\r\n$ ti sdk install -b master -d\r\n{code}\r\n\r\nAnd then\r\n\r\n{code}\r\ncd MY_WORKSPACE\r\nti create -p windows -t module\r\ncd MY_MODULE_NAME/windows\r\nti build -p windows -T ws-local -l trace\r\n{code}\r\n", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-04-06T07:58:57.000+0000", "updated": "2016-04-06T07:58:57.000+0000" }, { "id": "381859", "author": { "name": "buder", "key": "buder", "displayName": "Jörgen Buder", "active": true, "timeZone": "Europe/Berlin" }, "body": "With the script that I mention I have a full build folder with a windows visual project... don´t know if this helps..\r\n\r\n/Jörgen", "updateAuthor": { "name": "buder", "key": "buder", "displayName": "Jörgen Buder", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-04-06T13:10:55.000+0000", "updated": "2016-04-06T13:10:55.000+0000" }, { "id": "382040", "author": { "name": "buder", "key": "buder", "displayName": "Jörgen Buder", "active": true, "timeZone": "Europe/Berlin" }, "body": "So after these updates, I think (not sure) I was able to build and package a module, however now my environment can´t build and/or deploy the app to my emulator or device anymore. This worked perfectly until after this upgrade, do you know why this might be. Please consider that I am in critical production of the app and have a dead line. I use the Emulator 8.1. \r\n\r\nFirst I got a strange deploy error, but now after reboot Windows I got this , which surprise me as the folder is not a standard build folder, is this cleaned for real when I clean the project ? Everything is now different , Please help\r\n\r\n[TRACE] : C:\\Program Files (x86)\\Windows Kits\\8.1\\\\bin\\x86\\MakePri.exe Dump -IndexFile \"Z:\\Users\\jorgenbuder\\Library\\Application Support\\Titanium\\mobilesdk\\win32\\5.4.0.v20160406002717\\windows\\lib\\TitaniumWindows_Ti\\phone\\x86\\TitaniumWindows_Ti.pri\" -OutputFile ERV.dir\\Release\\TitaniumWindows_Ti.pri.xml -ExtensionDll \"C:\\Program Files (x86)\\Windows Phone Kits\\8.1\\\\bin\\x86\\MrmEnvironmentExtDl.dll\" -Verbose -Overwrite\r\n[DEBUG] : _CreatePackageLayout:\r\n Removing directory \"ERV.dir\\Release\\PackageLayout\\\".\r\n[TRACE] : Done Building Project \"C:\\Users\\jorgenbuder\\.titanium\\vsbuild\\gws\\phone.x86\\ERV.vcxproj\" (default targets) -- FAILED.\r\n[ERROR] : C:\\Program Files (x86)\\MSBuild\\Microsoft\\VisualStudio\\v12.0\\AppxPackage\\Microsoft.AppXPackage.Targets(1986,9): error MSB3231: Unable to remove directory \"ERV.dir\\Release\\PackageLayout\\\". The directory is not empty. [C:\\Users\\jorgenbuder\\.titanium\\vsbuild\\gws\\phone.x86\\ERV.vcxproj]\r\nC:\\Program Files (x86)\\MSBuild\\Microsoft\\VisualStudio\\v12.0\\AppxPackage\\Microsoft.AppXPackage.Targets(1986,9): error MSB3231: [C:\\Users\\jorgenbuder\\.titanium\\vsbuild\\gws\\phone.x86\\ERV.vcxproj]\r\n[TRACE] : Done Building Project \"C:\\Users\\jorgenbuder\\.titanium\\vsbuild\\gws\\phone.x86\\ERV.vcxproj.metaproj\" (default targets) -- FAILED.\r\n[TRACE] : Done Building Project \"C:\\Users\\jorgenbuder\\.titanium\\vsbuild\\gws\\phone.x86\\ERV.sln\" (default targets) -- FAILED.\r\n[DEBUG] : Build FAILED.\r\n[TRACE] : \"C:\\Users\\jorgenbuder\\.titanium\\vsbuild\\gws\\phone.x86\\ERV.sln\" (default target) (1) ->\r\n\"C:\\Users\\jorgenbuder\\.titanium\\vsbuild\\gws\\phone.x86\\ERV.vcxproj.metaproj\" (default target) (2) ->\r\n\"C:\\Users\\jorgenbuder\\.titanium\\vsbuild\\gws\\phone.x86\\ERV.vcxproj\" (default target) (6) ->\r\n[ERROR] : (_CreatePackageLayout target) -> \r\n C:\\Program Files (x86)\\MSBuild\\Microsoft\\VisualStudio\\v12.0\\AppxPackage\\Microsoft.AppXPackage.Targets(1986,9): error MSB3231: Unable to remove directory \"ERV.dir\\Release\\PackageLayout\\\". The directory is not empty. [C:\\Users\\jorgenbuder\\.titanium\\vsbuild\\gws\\phone.x86\\ERV.vcxproj]\r\nC:\\Program Files (x86)\\MSBuild\\Microsoft\\VisualStudio\\v12.0\\AppxPackage\\Microsoft.AppXPackage.Targets(1986,9): error MSB3231: [C:\\Users\\jorgenbuder\\.titanium\\vsbuild\\gws\\phone.x86\\ERV.vcxproj]\r\n 0 Warning(s)\r\n 1 Error(s)\r\n\r\n/Jörgen", "updateAuthor": { "name": "buder", "key": "buder", "displayName": "Jörgen Buder", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-04-07T07:46:10.000+0000", "updated": "2016-04-07T07:46:10.000+0000" }, { "id": "382044", "author": { "name": "buder", "key": "buder", "displayName": "Jörgen Buder", "active": true, "timeZone": "Europe/Berlin" }, "body": "I can also see that the tiapp.xml does not accept this:\r\n\r\ncom.test.se\r\n\r\nthe windows tag is not enumerated, and it says it supports:\r\n\r\nAndorid, iPad, iPhone, ivi (?) , and Tizen and mobileweb and commonjs\r\n\r\nHow do I add the module to the tiapp.xml ?\r\n\r\nthanks", "updateAuthor": { "name": "buder", "key": "buder", "displayName": "Jörgen Buder", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-04-07T07:54:21.000+0000", "updated": "2016-04-07T07:54:21.000+0000" }, { "id": "382045", "author": { "name": "buder", "key": "buder", "displayName": "Jörgen Buder", "active": true, "timeZone": "Europe/Berlin" }, "body": "Solved it, I had to remove the OLD run targets for both device and emulator\r\n\r\nAt this point I will now try to enhance the module with some function that returns native data like simony and also to generate the key I need for API encryption..\r\n\r\nThanks so far!!", "updateAuthor": { "name": "buder", "key": "buder", "displayName": "Jörgen Buder", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-04-07T07:56:53.000+0000", "updated": "2016-04-07T07:56:53.000+0000" }, { "id": "382318", "author": { "name": "buder", "key": "buder", "displayName": "Jörgen Buder", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hi\r\n\r\nI have been able to enhance the module with a function now as well, but have small trouble to understand how to parse the argument coming in , it is sometimes used as this:\r\n{code:cpp}\r\n TITANIUM_ASSERT(argument.IsObject());\r\nTITANIUM_ASSERT(argument.IsString());\r\n{code}\r\n\r\nbut I have no way to parse it for use, any example that I can use from the SDK, I can´t get it to work properly and would like to use the plain FUNCTION...\r\n{code:cpp}\r\nTITANIUM_FUNCTION(Extendwindows, createNotification)\r\n\t{\r\n\t \r\n\t TITANIUM_ASSERT(argument.IsObject());\r\n\t TITANIUM_ASSERT(argument.IsString());\r\n\t TITANIUM_LOG_DEBUG(\"Extendwindows:: called createNotification()\");\r\n\t \r\n\t //return get_context().CreateBoolean(true); // Works\r\n\t return get_context().CreateNumber(500); // Works\r\n\t //return get_context().CreateString(\"Hello\"); // Works \r\n\t //return get_context().CreateUndefined(); // Works\r\n\t}\r\n{code}\r\n{code:cpp|title=hpp}\r\nTITANIUM_FUNCTION_DEF(genKey);\r\n\t\t\tTITANIUM_FUNCTION_DEF(getValues);\r\n\t\t\tTITANIUM_FUNCTION_DEF(createNotification);\r\n\t};\r\n{code}\r\n\r\n\r\nAlso the loggs do not work even if I am in emulator...\r\n\r\nany additional help is much appreciated\r\n", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2016-04-11T13:31:39.000+0000", "updated": "2016-04-11T15:19:35.000+0000" }, { "id": "382329", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "The TITANIUM_ASSERT macros don't convert the argument, just confirm it's of a given type (and if not, will log an error).\r\n\r\nIf you're looking for examples on how to write native code, our source for the whole SDK is available and would be beneficial to look over. But here's a quick example: https://github.com/appcelerator/titanium_mobile_windows/blob/master/Source/UI/src/TextField.cpp#L358\r\n\r\n{code:cpp}\r\nTITANIUM_ASSERT(argument.IsString() || argument.IsNumber());\r\nlayoutDelegate__->set_minWidth(static_cast(argument));\r\nreturn true;\r\n{code}\r\n\r\nHere we are asserting that the argument is a JS String or Number, and we are converting it to a C++ std::string before passing it into a method call in C++.\r\n\r\nSo in your case, I'm not sure what exactly you're looking to do, but maybe this is a start:\r\n{code:cpp}\r\nTITANIUM_FUNCTION(Extendwindows, createNotification) {\r\n\tTITANIUM_ASSERT(argument.IsString());\r\n\tTITANIUM_LOG_DEBUG(\"Extendwindows:: called createNotification()\");\r\n\tauto msg = static_cast(argument); // cast the JS String to a c++ std::string\r\n\t// do something with the std::string...\r\n\treturn get_context().CreateBoolean(true); // return a boolean indicating success?\r\n}\r\n{code}\r\n\r\nTypically we use the assert to ensure our cast later doesn't fail in some non-obvious way to the user.", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2016-04-11T15:26:16.000+0000", "updated": "2016-04-11T15:26:16.000+0000" }, { "id": "382330", "author": { "name": "buder", "key": "buder", "displayName": "Jörgen Buder", "active": true, "timeZone": "Europe/Berlin" }, "body": "return get_context().CreateString(static_cast(argument));\r\n\r\nI have short with time right now, but I tried the above in my function and it crashed because the \"argument\" variable did not exist, it seems similar to what you propose and I am not sure that works, will try it but as I said the variables \"argument\" is not available outside the ASSERT. ?\r\n\r\n", "updateAuthor": { "name": "buder", "key": "buder", "displayName": "Jörgen Buder", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-04-11T15:32:25.000+0000", "updated": "2016-04-11T15:32:25.000+0000" }, { "id": "382336", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "Sorry, I didn't look close enough, you're doing a function - not a property setter. For a property getter, there is no argument; for a property setter, there's a single argument in a variable named \"argument\"; for a function there's an array of arguments in a variable named \"arguments\".\r\n\r\n{code:cpp}\r\nTITANIUM_ASSERT(arguments.size() == 1);\r\nauto _0 = arguments.at(0);\r\nTITANIUM_ASSERT(_0.IsString());\r\nauto msg = static_cast(_0);\r\n{code}", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2016-04-11T16:38:50.000+0000", "updated": "2016-04-11T16:39:07.000+0000" }, { "id": "382710", "author": { "name": "buder", "key": "buder", "displayName": "Jörgen Buder", "active": true, "timeZone": "Europe/Berlin" }, "body": "Gary,\r\n\r\nIt turns out the module that are created have a lot of local references, it means that I am not able to share the module with other developer because lots of file references go to my user and computer, can I somehow clean this up and regenerate this meta data so that it builds on other machine?\r\n\r\nAll modules in iOS and Android can be build with any user/machine/environment\r\n\r\nExample:\r\n\r\nCMakeLists.txt :\r\n\r\n# Titanium Windows Native Module - extendwindows\r\n#\r\n# Copyright (c) 2015 by Appcelerator, Inc. All Rights Reserved.\r\n# Licensed under the terms of the Apache Public License.\r\n# Please see the LICENSE included with this distribution for details.\r\n\r\ncmake_minimum_required(VERSION 3.0.0)\r\n\r\nif(${CMAKE_SYSTEM_NAME} STREQUAL \"WindowsPhone\")\r\n set(PLATFORM wp)\r\n add_definitions(\"-DPHONE\")\r\nelseif(${CMAKE_SYSTEM_NAME} STREQUAL \"WindowsStore\")\r\n set(PLATFORM store)\r\nelse()\r\n message(FATAL_ERROR \"This app supports Store / Phone only.\")\r\nendif()\r\n\r\nproject(GwsExtendwindows)\r\n\r\nset(GwsExtendwindows_VERSION 0.1.0)\r\n\r\nset(WINDOWS_SOURCE_DIR \"Z:/Users/jorgenbuder/Library/Application Support/Titanium/mobilesdk/win32/5.4.0.v20160406002717/windows\")\r\n\r\nSET(CMAKE_FIND_LIBRARY_PREFIXES \"\")\r\nSET(CMAKE_FIND_LIBRARY_SUFFIXES \".lib\" \".dll\")\r\n", "updateAuthor": { "name": "buder", "key": "buder", "displayName": "Jörgen Buder", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-04-14T09:10:07.000+0000", "updated": "2016-04-14T09:10:07.000+0000" }, { "id": "416555", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as fixed, if there are any problems, please file a new ticket.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-31T22:01:29.000+0000", "updated": "2017-03-31T22:01:29.000+0000" } ], "maxResults": 24, "total": 24, "startAt": 0 } } }