In-App Purchases Available in the Ubuntu Store

I haven’t seen anyone else trumpeting this online. So I guess I will. 🙂

Since Ubuntu Touch’s OTA 10 update, apps can offer in-app purchases! Yay!

Besides allowing someone to write the next Candy Crush, this also means that app authors can stop providing separate “donation” versions of their app. Which means less busywork for authors, reviews are all on the same app, and less confusion for users.

Documentation is available from the QtPurchasing module docs. And remember to update your app’s framework to 15.04.4 (OTA 10).

If you want to see it in action, I’ve enabled a donation button in my “Lone Wolf” game app. No need to actually donate, it just might be interesting to see how it looks to the user (hit the “night mode” button in the upper right to see it — donating turns on the night mode feature).

Speaking of which, if you actually do something based on a purchase (like enabling a feature), the QtPurchasing docs recommend saving purchase information in “persistent storage.” I’ve just stuffed a boolean in a Settings object. But that’s easy for a user to modify themselves on disk. I don’t care about donation fraud, but I’m curious how I should better protect against that, in case I do something more interesting with IAP.

3 thoughts on “In-App Purchases Available in the Ubuntu Store”

  1. You could store an md5 hash that you could verify later, generated using some formula plus some identifier like the ubuntu username so it can’t be shared easily between people.

  2. Andrew, that wouldn’t prevent someone from posting a “here’s how to get this for free” one liner online. It would just have a $USER in it.

    But I guess I could add a secret value in the binary to use in the hashing that is left out of the published source.

Comments are closed.