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.