Possibility of getting an IAP add-on for Codea?

It seems like a lot more people are starting to use Codea as a full app development interface, instead of just a prototyping software. One of the things that pretty much every game on the app store implements, is in app purchases. However, there are no tutorials or add-ons for Codea for in app purchases.

Anyone out there have an in-app purchase add-on/tutorial that they would be willing to share? It would greatly help a lot of us that are developing for the app store.

@Simeon Any possibility of getting an in-app purchase add-on implemented into one of the builds?

In App Purchases is the one big thing that is missing from Codea that is keeping it from being the perfect app development suite on the iPad.

IAP is added during Xcode, i dont think the all mighty Apple would like that much

I mean an Add-On like Gamecenter and iAds add-ons work at the moment. The add-on is written in Xcode, but you can trigger the add on with lua code. For example with the iAds add-on you use showAdfromTop() or hideAd() in lua which triggers the Xcode add on to run.

have you checked this? http://github.com/twolivesleft/Codea-addons

I have worked with and I know @Zoyt has done iAPs addon before but that was with the old runtime. It is somewhat more complicated than other add-ons like game center, but doable

@JakAttak Would you be willing to share your add-on, so I can try to figure out how to get it working with 2.1.1. I’m a complete newbie with objective-c so it would be impossible for me to write my own.

Would be greatly appreciated

@JakAttak - seconded :slight_smile:

@Crumble, @TechDojo. Sorry if I was unclear above, I mean’t that I have worked with Zoyt’s code, not made my whole own.

However, you can find his add-on in the files for StackIt:


@JakAttak Nice! That is going to take some time to figure out how to convert to 2.1, but I’ll try to figure it out. Having in app purchases working is huge. Thanks much!

@TechDojo If you figure it out before I do, please share. :wink: I’ll do the same.

@Crumble Feel free to let me know if you have issues, but I don’t quite have the time to do it myself. Sorry!

@Crumble - will do :slight_smile:

@TechDojo, have you managed to make it work? Any advice? :slight_smile:

This was one of those issues that got resolved when I moved over to using Corona for submissions and kept Codea for prototyping purposes - there are a couple of decent IAP plugins that worked reasonably well.

Having looked deeper into the process there are a few steps and so it’ll never be a quick solution.

Looking at the Corona example, you’ll need to initialise the store, get a list of products, attempt to make a purchase, attempt to restore purchases. This is just for a simple one-off IAP (like unlocking a full version), it’s a bit more complicated when your using IAP to purchase a consumable (ie in game currency).

There’s a whole load of functions that would need to work together to complete the process.

If I was going to start again with this, what I’d do is find either a Swift or Obj-C example that demonstrated the entire IAP process and then isolate each part as a separate function with clearly defined input’s / outputs, then I’d create a Lua / C wrapper to create the interface to Codea.

I did get a basic addon tutorial complete and working but it was a lot of faff but it is possible to create an IAP addon - I for one would certainly pay or contribute to a kickstarter if someone wanted to take up the challenge.

Personally I think that given the current state of the iOS market place, having a free version to get someone to actually download your app is vital, then have a single IAP to unlock the full game makes the process as simple and frictionless as possible.

Unless you’ve got massive numbers trying to monetise with iAd’s is almost impossible and maintaining two separate versions of your app (free / paid) is a PITA and actually forces your customers to complete an extra step which means extra friction and less downloads.

Thanks TechDojo! If @Simeon doesn’t have plans to provide a simple add-on, I like your idea of contributing money to having one of us coding it. With the talents around here, I’d be surprised if this issue wasn’t tackled relatively quickly…

@simeon is probably the most qualified to make an iap add on, after all, Codea was made in objective c.

I would gladly pay extra via in app purchase, for an in app purchase add on.

And, Apple just announced they’re closing down iAd.

Personally I hate iAd, unless you have literally 10’000s of active installs the income is negligible. I’d bet more money has been made through iAP’s to disable annoying ad’s than has been made via iAd’s.

My own thoughts is that iAP is just an annoyance and only serves to piss off potential customers who’d take exception to them - plus there’s the fact that if your device isn’t connected either via WiFi or 3/4G then the ad’s don’t show anyway which is very easy to do on iPad anyway - just activate airplane mode, start your favourite ad supported game and bamm instant ad blocker!

Sounds like they are shutting down the part of iAds that allows developers to promote their apps in iAds. Not iAds in general. I say good riddance to that part of iAds, nothing worse that trying to make money with ads and just promoting other apps.

I personally hate in app purchases, and how every app on the store focuses on them. But you basically have no other choice, it’s either in app purchases or selling it for $.99. I wish Apple would get rid of in app purchases, it totally ruins the App Store. Everything is just a pay to win game, or incomplete app that you have to pay to unlock all the features.

IAP is actually a very useful concept, it’s just that it’s been abused a lot by the idea of freemium games.

I’m guessing what you hate is the “consumable” or the way you have to “pay to progress” model.

Personally I think using a free download as a way of providing a demo of you app / game and then having a single IAP to unlock the full product is the best / easiest way to get someone to try out your game without the risk of paying (a non refundable amount) and then not liking your game.

I agree with TechDojo. For most of us, there is little hope to make any significate (meaning above hundreds of $) profit with 99c apps.

Here are the downloads for my game In Churning Seas:

They are absolutely negligible at two exceptions:

  1. the first one is a peak in September, which is when I droped the price to TierA (16c in China instead of about 1$ elsewhere)

  2. the second one was two weeks ago when I dropped the app’s price to free for 5 days.

During the second one, the app was averaging about 3000+ downloads a day (the numbers were dropping by the end of the week though), as opposed to 10/15 times for a normal week at TierA price.

I might be wrong, but I have a feeling that leaving the app free, with unlockable content at 1$, would likely make our hard work a little more profitable :smile:

To sum it up: @simeon, we badly need an IAP add-on :wink: