Search code examples
androidiosin-app-purchasein-app-billingiap-hosted-content

Can I sell downloadable content as part of Android and iOS in-app purchases?


I have to create an application for iOS and Android, from which I can buy some "items".

I don't understand how the in-app purchase work; can I buy and download the content I already paid for? Or can I buy just the unlocking of internal content without downloading it? If its just for unlocking internal content, is there any way to buy and download the content?

Thanks


Solution

  • The only thing you can't do with in-app purchase is selling actual goods - that's also allowed in case you have a website doing the same thing (eg ebay app). And there are some more rules for iOS in-app purchase.

    As for the step by step idea about in-app purchase, here is a gist:

    • iOS app requests for SKProducts from app store (already setup via itunes connect portal by developer)
    • The retrieved products are displayed in the app along with localised pricing
    • User selects a product to buy
    • Purchase goes through via various steps - in-progress / success / failure. Depending upon the status, the app UI should be updated to keep the user informed.
    • Upon successful purchase, you can download content inside the app using your own server, or the content that's uploaded on Apple servers. You can unlock the content from within the app as well.

    In a nutshell, you have a long way to go. The best way to start theoretically is to refer to In-app purchase programming guide. In addition, this book by Apple is also helpful. And for your needs, here is a sample code from Apple to begin with.

    If you rather want a step by step tutorial, here is one authored by me. A rather easier one is the video lecture series with SWIFT and Objective C - prepared by me - which also accompanies code sample for SWIFT and Objective C to save time.