How does it work today --- can downloaded lua be loaded dynamically?

Why not include just the activity and then enable it after IAP?  Seems real simple to me…

Example: So player can jump 5 tiles, after IAP player can jump 10 tiles… does this require a new player.lua to be loaded? Absolutely not as it is simply a variable change.

There are no use cases that absolutely cannot be handled currently with regard to IAP (power, extra moves, etc).

An example

jumpMax = 5 if myIAPUnlocks.megaJump then jumpMax=10 end -- process jump logic now

Thanks for the example, @Sphere Game Studios. The example you provided is something that I will be doing for features that are enabled by IAP and, as you stated, are real simple.

What I’m more interested in is the ability to dynamically load activities that are written after the app is installed and can be purchased by a user later.

You simply write the activities in advance and include them in your game/app.  I don’t get why this has to be more complicated than it needs to be.

A use case might help here?

I guess what you’re asking is “why don’t you just keep releasing new versions of your app with each new version containing all the possible activities up to that point?”

If that is your question, then I’d like to keep the app small and I’d like to avoid frequent app submissions. I don’t see it as complicated.

No what I am saying is player has actions A, B and C as default and with IAP then it has D, E an F then code all possibilities and just release a version that allows A, B, C, D, E and F

If IAP is purchased then process D, E and F, otherwise process A, B and C.

You may think you need framework changes to support what you want and that is an incorrect preposition… you can code this “change” easily and now with current release.

While I understand your example, it doesn’t fit what I am doing. And for the matter, I’m not developing a game.

Have you dealt with a scenario in which what you want to update is orthogonal to what your app already does? Meaning, you’re not replacing A,B,C with D,E,F. Instead, you have to add on a brand new something and that something gets wired into your existing app.

Again - I get that I can keep re-releasing the app with everything included and enable things via IAP… but that doesn’t help with the app size and doesn’t help with release frequency.

Well then drive content from your server if it is a business app.  Just hit a different end point if player has made a purchase?

I don’t know your app so cannot comment, just suggesting some ideas.

Expecting Corona to change for you ain’t gonna happen…

Maybe hit up @rg for some custom dev if you need the help (this is totally something that can be server driven right now)

Note: Submitting regular updates to your app will be much simpler than maintaining (and paying for) your own server to host this code. 

You’re already going to be making updates if you add new IAP items to the IAP list.

Also, then you can fully test your app and ensure there are no issues or surprises. 

While I’d love you to buy my plugin, I think in most users’ cases, it is much better to do regular updates and releases.

Finally, and I could be wrong, regularly updating your app helps it stay higher in the search results.  I think…

PS - @SGS is right.  If you really need this, it is something I can do custom coding for.  i.e. If patcher isn’t just right the solution can be modified.

Code doesn’t add much to the weight of your app, so including the logic in your initial app or in updates isn’t bad. Today you can download images, audio, JSON data that can be easily converted to Lua tables which can easily add additional levels to games without bloating the size of the app and without needing executable Lua.  As @sgs said, you can lock all of this behind your IAP using logic.

Then to add on @roaminggamer’s concept of regular updates, don’t underestimate the marketing value of frequent updates. It can help your app move up charts. Your users don’t see your apps as abandonware.

Rob

Old post but I’d like to chime in here with my perspective. I’m in a similar boat to @murph and think I understand what he is trying to achieve.

In my case, with many small single-activity kids apps (puzzles, coloring books, etc), it is becoming clear that model won’t be sustainable (c.f. Google’s new repetitive content guideline and Apple’s anti-spam). In the past I’ve used cross-promotion in the belief that users will find my other (equally small) apps and keep playing my games. But it doesn’t work that way, for the majority of people. So I need to start bundling multiple apps & activities into single apps.

For example, various puzzle theme apps such as Cats, Dogs, Horses will become a single puzzle app. I could just lump all the content into the app, but the APK size will grow quite a lot because the content is asset-heavy (lots of photos). 

Instead, users will download a core puzzle app, and can then download content packs. This delivery is surprisingly cheap - I’m currently using this approach in some apps and with a content delivery network such as CDN77.com I’m currently delivering 800+ GB per month at a cost of less than $40. To finance it, the user is shown a rewarded video before the download, generating around $400 per month in revenue.

Going beyond bundling similar apps I’m also going to look into bundling different activities into single apps. So you might have a Dinosaur activity app with puzzles, coloring books, etc. Then I might want to make the code as well as assets for these activities downloadable on the fly. There will still be updates from time to time to core code, but I hope to increase retention by not requiring updates to get the latest activities. I’m envisioning combining this with push messages to draw attention to new activities.

Both Google Play and The App Store do not have issues with you downloading content after the fact. Their objection is changing how the code works without an update going through review and the end user making a conscious choice to accept your behavior changes. I don’t know that Google has really ever had an issue with this. Apple did. Apple has eased some of these restrictions and we’ve enabled the loadstring() Lua API to dynamically execute some Lua after the fact.

However, based on your description, I don’t see why you really need it. You can, without issue download content from your web server. You can download data in JSON format that contains information about the puzzle: images, where they should be drawn, sounds, values, etc. The JSON can be read in, turned into a Lua table and your existing puzzle.lua can then have new content to work with.

If for some reason you need to had new code behavior, simply update the app with the new logic. Code doesn’t take up significant storage relative to images and audio, so it wouldn’t bloat your app by any significant amount and it’s well known that reasonably frequent updates to your app can help increase app usage and ranking.

No doubt adding all the art to your base app would make it huge, but you can do everything you want to without having to downloadable Lua code.

Rob