Reputation: 2169
Is there any (easy) way to link to native libraries, specifically OpenCV, using Telerik NativeScript? I suppose since it outputs source I could go into the Android and ios projects after compiling and implement all of the openCV code seperately, but that sort of defeats the purpose of using NativeScript, imo.
Is there any cross-platform way to interface with native code?
Thanks!
Upvotes: 1
Views: 1481
Reputation: 95
here is iOS pack for openCV:
and for android you can download it from here:
EDITED:
a solution is to write a plugin and reference the OpenCV framework using cocoapods
here is the link of how to write a plugin in native script by cocoapods NativeScriptUsingCocoapods
Upvotes: 0
Reputation: 6157
If OpenCV supports Android and iOS then you would need to create the communication to the native code to use it. That's how all of NativeScript works, it allows you to use Javascript (TypeScript) and communicate directly to native code without any wrappers.
So essentially everything in NativeScript has a wrapper to the underlying native code/components, that's the difference and the power behind products like NativeScript and React Native as opposed to Cordova based apps (PhoneGap, Ionic, etc.).
Since your question isn't a code specific question, it's kind of hard to answer and there might be a slight misinterpretation on my part of what you are really trying to understand. Hope this helps in some way. :)
Upvotes: 2