How can I download additional executable content after an In-App Purchase?

Hello all!

We are trying to build a kiosk-like app where you can do IAP of ebooks and download the new content (new ebooks) from inside the app and read them there.

Now, we know there is in the API a way to download new assets, such as sound files or graphic files, that you can then use in your app.

There is apparently no way to download .lua files or any executable content. This is a security feature and understandable, but it leaves us wondering how we can download a fully new, custom ebook inside the app, where the animation ( done with the Corona SDK ) is all lua code.

Some people have talked in the forum about somehow building a wrapper for the code by encoding calls inside JSON files or XML files.

This seems quite reasonable and doable, but time consuming. 

We were wondering if this exists anywhere for reuse or if there is a third party platform of this type that can be used inside Corona. Or, if anyone has any idea of how this is done. We are pretty sure its been done quite a few times before as IAP are a huge revenue driver and one would imagine people try to use this channel for content delivery all the time.

Any help will be greatly, greatly appreciated.

Salud!

Juan

You need to think about splitting data from logic - as you seem to be on the correct path towards.

The Logic is essentially how you’re presenting and working with the Data - which would be the contents of the ebook.

I would look at bundling the data/content inside a structure (JSON would probably be preferable) and your logic needs to parse this and present it - plus handle any interactions, etc…

Thanks for the advice SegaBoy. I think we would probably encode the calls with the parameter data and with those sort of make a script of calls that would be the logic flow of the scene. I was hoping someone had built this kind of wrapper for Corona before and we could just use their data bindings and platform. If you know of any like that please do let me know. I just hate to repeat work done by others, especially hard work that a lot of tought has gone into.

You need to think about splitting data from logic - as you seem to be on the correct path towards.

The Logic is essentially how you’re presenting and working with the Data - which would be the contents of the ebook.

I would look at bundling the data/content inside a structure (JSON would probably be preferable) and your logic needs to parse this and present it - plus handle any interactions, etc…

Thanks for the advice SegaBoy. I think we would probably encode the calls with the parameter data and with those sort of make a script of calls that would be the logic flow of the scene. I was hoping someone had built this kind of wrapper for Corona before and we could just use their data bindings and platform. If you know of any like that please do let me know. I just hate to repeat work done by others, especially hard work that a lot of tought has gone into.