Building native libraries

Hello,

I’m interested in building native libraries and I’m wordering if this is possible through Corona. Let me explain: I would like to develop some core business logic in a cross-platform way (with Corona) and output this library into something native that I could give to (native SDK) Android or iOS developers, so that they can build their apps on top of my library. AFAIK, libraries in Android can be imported as library projects with source code or .jar files and in iOS, libraries are .a files (with the respective headers).

Is it possible to accomplish this with Corona? Can I build my Corona library projects into something sensible which can be imported Android/iOS native SDKs?

Thank you,

Kostis

Kostis,

Let me make sure I understand what you are asking… are you saying that you would like to develop something in Corona (with Lua) and then have that called (or embedded) within a native iOS or Android (non-Corona) app?

Thanks,

David

Hi David, thanks for the reply. Yes, that’s exactly what I want. Is it possible to do this in Corona?

Kostis, this is possible with Corona Enterprise. It is working on Android today (and the Corona Enterprise bits have a sample app for this) and will be working on iOS soon. But you would indeed have to use Corona Enterprise to be able to do this.

David

I wouldn’t mind using Corona Enterprise, but how soon do you estimate this to be working on iOS?

Right now, the solution that I’m working on involves developing the business logic in C++, and writing wrappers in order to interface it through the Android NDK and Objective-C++. Would using Corona provide any advantages compared to the approach I am following? For example, now, in order to make an HTTP POST, I am trying to build libcurl for Android and iOS. Would Corona be able to use the native HTTP POST approaches (NSURLRequest and org.apache.http.client.methods.HttpPost) and save me all this trouble?

Thank you for your help,

Kostis

Kostis - I’m getting an answer for you soon…

Thanks David!

Kostis - here is one response from one of our engineers:


Corona’s network APIs in make it simple to do HTTP posts in Lua script.  He might not have to implement anything in native code at all since Corona already does so.  For example, our iOS implementation of the network APIs uses the NSURLRequest that he mentioned on iOS.

 

Documentation for our network APIs can be found in the link below.  These are network APIs are asynchronous.

   http://docs.coronalabs.com/api/library/network/index.html

 

Our Corona Simulator comes with several network sample projects as well which are free to test out.


Let me know if this helps. As mentioned, if you want to embed the Corona code/app in a native app, then you would need Enterprise. But perhaps the code itself you want to write can be done at the Lua level.

David

Thank you, I appreciate the help. As I’m in a hurry, I’ll start with the C++ solution, which is supported by both Android and iOS, and wait for the next versions of Corona where building iOS libraries will be possible.

Thank you,

Kostis

Kostis,

Let me make sure I understand what you are asking… are you saying that you would like to develop something in Corona (with Lua) and then have that called (or embedded) within a native iOS or Android (non-Corona) app?

Thanks,

David

Hi David, thanks for the reply. Yes, that’s exactly what I want. Is it possible to do this in Corona?

Kostis, this is possible with Corona Enterprise. It is working on Android today (and the Corona Enterprise bits have a sample app for this) and will be working on iOS soon. But you would indeed have to use Corona Enterprise to be able to do this.

David

I wouldn’t mind using Corona Enterprise, but how soon do you estimate this to be working on iOS?

Right now, the solution that I’m working on involves developing the business logic in C++, and writing wrappers in order to interface it through the Android NDK and Objective-C++. Would using Corona provide any advantages compared to the approach I am following? For example, now, in order to make an HTTP POST, I am trying to build libcurl for Android and iOS. Would Corona be able to use the native HTTP POST approaches (NSURLRequest and org.apache.http.client.methods.HttpPost) and save me all this trouble?

Thank you for your help,

Kostis

Kostis - I’m getting an answer for you soon…

Thanks David!

Kostis - here is one response from one of our engineers:


Corona’s network APIs in make it simple to do HTTP posts in Lua script.  He might not have to implement anything in native code at all since Corona already does so.  For example, our iOS implementation of the network APIs uses the NSURLRequest that he mentioned on iOS.

 

Documentation for our network APIs can be found in the link below.  These are network APIs are asynchronous.

   http://docs.coronalabs.com/api/library/network/index.html

 

Our Corona Simulator comes with several network sample projects as well which are free to test out.


Let me know if this helps. As mentioned, if you want to embed the Corona code/app in a native app, then you would need Enterprise. But perhaps the code itself you want to write can be done at the Lua level.

David

Thank you, I appreciate the help. As I’m in a hurry, I’ll start with the C++ solution, which is supported by both Android and iOS, and wait for the next versions of Corona where building iOS libraries will be possible.

Thank you,

Kostis