Titanium JIRA Archive
Appcelerator Community (AC)

[AC-5351] Load external libraries and SDK with appcelerator hyperloop

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionNeeds more info
Resolution Date2017-11-30T21:41:38.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsHyperloop
Labelshyperloop
ReporterSandro Lain
AssigneeShak Hossain
Created2017-11-07T10:01:02.000+0000
Updated2017-11-30T21:41:38.000+0000

Description

I'm working on a iOS and Android DVR app with remote controls. I need to use a third-party library for network communication and video encoding, via hyperloop programming. At the moment I tried importing the iOS version libraries. The library consists of a static file libDVR_NET_SDK.a and a "include" folder with several .h header files inside. I followed the official documentation ad copy the files into folder /app/platform/ios without creating the appc.js file (documentation report that is deprecated). I can not understand how to call the external library from javascript code, at the moment I tried: var libDVR_NET_SDK = require("libDVR_NET_SDK"); But the following error is generated with simulator: [ERROR] : Script Error Couldn't find module: libDVR_NET_SDK for architecture: x86_64 Or on device: [ERROR] : Script Error Couldn't find module: libDVR_NET_SDK for architecture: arm64

Comments

  1. Mostafizur Rahman 2017-11-07

    Hello [~sandrolain], Thanks for sharing with us. Check [Modules inTitanium ](https://docs.appcelerator.com/platform/latest/#!/guide/CommonJS_Modules_in_Titanium). Please make sure the module is included in the tiapp.xml and to be rebuilt with 64-bit support. Please follow the steps, test in latest SDK and let us know how it goes.
  2. Sandro Lain 2017-11-07

    Hello What I'm trying to import is not a titanium module but a pre-compiled native library given by our vendor hrough hyperloop.
  3. Hans Knöchel 2017-11-07

    You need to require the actual headers, not the static library itself. Also, it looks like a C++ library, which types are not fully supported in Hyperloop, yet. In that case, you may want to wrap the API's using a native module (create a new one with appc ti create -t module).
  4. Mostafizur Rahman 2017-11-08

    [~sandrolain], Did you manage to follow [~hknoechel] 's instructions?
  5. Sandro Lain 2017-11-08

    I'm trying to create a module that incorporates the code and native libraries I have been provided, but I do not have much experience with creating native modules.
  6. Sharif AbuDarda 2017-11-08

    Hello, you need to build a module to support your C++ library with Appcelerator. Currently, hyperloop does not fully support that. There is a guide on how to get started with Android module in Appcelerator, http://docs.appcelerator.com/platform/latest/#!/guide/Android_Module_Project. Thanks.
  7. Mostafizur Rahman 2017-11-12

    Hello [~sandrolain], I just wanted to follow up here. Did you manage to follow the instructions provided earlier? Let us know if you still experience any issue. We would be happy to assist you. Best Regards!

JSON Source