-3

does anyone knows of a cordova plugin that can communicate with a C library?

In my project I need to pass some data through a C library. From what I understand I need to go through javascript -> objective-c -> C in order to do what I want. Little issue, I don't know Objective C, or Swift.

If anyone's heard of that please let me know.

Cheers.

Got The Fever Media
  • 750
  • 1
  • 9
  • 27

1 Answers1

1

The Cordova plugin that communicate with a c library is the Cordova framework itself!

When you call from a Cordova plugin the exec function, Cordova will search for a mapped action in the native layer to execute.

When you are in the iOS native layer you can use functions from a C library: see this question, and this, and also this to know how include a C library in a Xcode project (search here for more interesting questions).

By the way, a very common task among iOS developers is to include and use the OpenSSL library: this library is written in C.

See the plugin development documentation and the iOS plugin platform documentation for more information.

Community
  • 1
  • 1
lifeisfoo
  • 15,478
  • 6
  • 74
  • 115
  • thank you very much for you reply. I will look at the links you gave. As I said I'm fairly new to Objective-C and all. – Got The Fever Media Aug 28 '15 at 06:13
  • Is it possible to implement a steam based communication with a C library? I need to implement a pipe communication between library and the front end?. – mahedhanu Nov 14 '20 at 16:24