In-App Purchase / On-Demand Resources

135 Views Asked by At

Using on-demand resources in conjuction with iOS in-app purchases is understandable when resources are included with the application. But how do I add additional in-app purchases after the application is on the store? I'm not referring to the process of creating a new in-app purchase in iTunesConnect.

I'm trying to understand if I create a target for a new in-app purchase on the original app and upload the target to the app store if that data will be available for use as an in-app purchase. The WWDC videos indicate there two ways to host in-app purchases: on-demand resources and hosted content. Is the process for uploading the same for both?

1

There are 1 best solutions below

8
On

There are several ways you could do this.

1) You could use the SKProductRequest to check for some programatically generated product identifiers (ex: com.company.app.inappItem1, ''2, ''3). The response will include the products you've actually defined in itunes connect. Usually though your app will have to do something with those purchases so you will need to know about all the available products ahead of time anyways. I guess you don't necessarily need to expose them all immediately.

2) You expose a web service somewhere (could just be a website that lists the product id's) that could tell your application what the currently available products ids are. Your application could then check with your backend for the list of product ids to use in the SKProductRequest.

In either case you need to keep in mind that you will probably update your app with new functionality at some time. Old versions of the app may not be able to handle your newer data assets, so you will need to handle this somehow.

You will need to resubmit your app to the store if your in app purchase requires new code to work. If it just a data asset they are buying (not executable code), however, the in app purchase can trigger a download to get that data.