[TIMOB-24282] Windows: Ability to expose a 3rd party SDK to Titanium
GitHub Issue | n/a |
Type | Story |
Priority | High |
Status | Closed |
Resolution | Done |
Resolution Date | 2017-05-10T04:36:22.000+0000 |
Affected Version/s | Release 6.0.0 |
Fix Version/s | Release 6.1.0 |
Components | Windows, Windows phone |
Labels | eng-priority |
Reporter | Neeraj Mishra |
Assignee | Kota Iguchi |
Created | 2017-01-06T21:18:11.000+0000 |
Updated | 2017-05-10T04:36:22.000+0000 |
Description
Problem Description:
We have received the following query on exposing the third party SDK to Titanium. Please find below the detailed info from customer:
bq. We need a way to expose SAP's SMP SDK to Titanium in Windows.
bq. Background:
bq. --------------------
bq. We recently needed to do this for an Android app - What we did was to build a native module that interfaced with all methods from SMP we needed so that Titanium could consume them. This module was a native module, written in Java and Kroll APIs.
bq.
bq. We need to do something similar with Windows, but we know Kroll is not an option, so we're wondering if Hyperloop would be the right choice for accomplishing this. We need to somehow build something (for Windows) that interfaces with SAP's SMP SDK for Windows and be able to consume these methods from Titanium. As discussed in a call with the Appcelerator team the ability to do this is a go/no-go decision to use Titanium for Cintas.
Attachments
File | Date | Size |
sap.jpg | 2017-01-21T00:25:56.000+0000 | 107304 |
Followed up on the same topic here: TIMOB-24283.
[~nmishra] Yes please :)
{quote} 1) Modify the Application's manifest to add the Extensions {quote} You can define any
Extensions
in your applications config (tiapp.xml
). Titanium puts them into Appx manifest as it is. For instance.{quote} 2) That our Titanium Module or Application (which consumes such libraries), be set in such a way that, the Application package contain the third party libraries. {quote} In order to package 3rd party libraries with your module, dealing with
CMakeLists.txt
in your module project is needed to make sure the module includes required libraries since our build system is based onCMake
. This will need some CMake commands like [target_link_libraries](https://cmake.org/cmake/help/v3.3/command/target_link_libraries.html), [target_include_directories](https://cmake.org/cmake/help/v3.3/command/target_include_directories.html) and so on. After updating CMakeList.txt, you can re-create Visual Studio project files by using--run-cmake
option (See TIMOB-24331) So CMake is very flexible tool but I guess the real problem there is that dealing withCMake
is generally pain for the most of Titanium developers maybe? We might want to add simple commands or something to deal with those common tasks like this. Feel free to create new ticket for it when you have ideas about this kind of additional functionalities.After some consideration about having easier way to package 3rd party library other than "dealing with CMake manually", I'm planning to come up with following packaging ideas just like what Titanium Android module does for use of 3rd party JARs. - Every \*.lib, \*.dll and \*.winmd files in *lib* folder will be packaged into module and also copied/linked during Ti app build. - Every files in *platform* folder are packaged into module and copied into Ti app so module can overwrite files during Ti app build.
Thanks for the info. Created TIMOB-24455 and TIMOB-24454.
Status: - Library integration improvement is In Review: TIMOB-24454 - Added documentation on integration with .NET code: [Integrating Windows Runtime Components in C#](https://wiki.appcelerator.org/pages/viewpage.action?pageId=49158655) TIMOB-24378 You can try it out once TIMOB-24454 is merged to 6.1.0 branch.
Closing this as Done, this is implemented in 6.1.0. (TIMOB-24454 and TIMOB-24378)