I am implementing In-App Purchase using Apple-hosted content. Previously I was using Urban Airship to host my content, and using their SDK to provide the in-app store UI and purchase functionality.
Since Urban Airship are discontinuing their IAP support this July, I need to replace it.
The Urban Airship SDK had support for updating purchased content. I see that StoreKit provides this functionality (at least to an extent) but am unsure on how to properly implement the content update itself.
SKProduct
has a downloadContentVersion
which specifies the version of the content that is available to download from Apple. I keep track of what version is currently downloaded within the app - so I know when an update is available.
The part I am stuck with is how to actually download the updated content?
My first thought was to do a Restore for that particular purchase, but there seems to be no way to restore individual products (only all products). Second thought was to just re-purchase the product, but this presents an alert to the user indicating that they will be charged again -- they will not be charged, however, since another alert is displayed after re-purchasing informing the user that the content is already purchased and will be re-downloaded for free -- but to me this feels like a bad user experience, they may not necessarily know that they won't be charged again until after agreeing to the purchase.
The documentation says not to create SKDownload
instances myself, so I can't just create one and add it to the download queue.
How am I supposed to implement content updates for In-App Purchase when using Apple-hosted content?