What is the difference between Apple Hosted Content and On Demand Resources in the context of an in-app purchase?

I'm having great trouble with various issues regarding hosted content. Among many attempts to upload an in-app purchase hosted content package, I have only succeeded once, repeatedly receiving the message that my IAP product ID is not recognised. The one time it did succeed, I then realised I wanted to make changes, but could not delete the hosted package or IAP, seemingly because it was being processed. Hence I created a new IAP, but as mentioned previously, it won't recognise my upload. Fundamentally, however, I do not see what the difference would be to upload one bundle with on demand resources versus using hosted content for the IAP and uploading a seperate IAP package. Is it that the IAP hosted content is dowloaded automatically at purchase time? Also, is there any difference between having the IAP content on Apple's servers and downloaded/downloadable when purchased versus having it on the app bundle, which locates ODR on Apple servers anyway? My app makes NSBundleResourceRequests for ODR in the main bundle, but checks to see if the non-consumable unlock of the full game has been purchased and makes further ODR requests. Is it possible that someone can hack my code and request ODR more easily than hosted IAP content?

Answered by PBK in 424528022

You are correct - #3 and #4 do not apply to ODR. I misread your original post and focused on:


Is ......hosted content ... dowloaded .... at purchase time? Also, is there any difference between having the IAP content on Apple's servers and downloaded/downloadable when purchased versus having it on the app bundle,


Like IAP, ODR is not downloaded in the original in the app bundle. When you asked the question this way I assumed you were placing the content directly in the app binary not in ODR.


The way IAP hosted content is downloaded into an app gives the app a bit more control, but that control may not be needed. Also, once downloaded the app must retain hosted content as a file on the device - I think ODR can be swapped in and out of memory as determined by the system. There appears to be little difference as far as the IAP is concerned if you place the ODR tag behind a wall in your app that is opened with a simple IAP. I think #1 and #2 may be different for hosted content than ODR.

Reformatted for readability... HTH

-=-


I'm having great trouble with various issues regarding hosted content.


Among many attempts to upload an in-app purchase hosted content package, I have only succeeded once, repeatedly receiving the message that my IAP product ID is not recognised.


The one time it did succeed, I then realised I wanted to make changes, but could not delete the hosted package or IAP, seemingly because it was being processed.


Hence I created a new IAP, but as mentioned previously, it won't recognise my upload.


Fundamentally, however, I do not see what the difference would be to upload one bundle with on demand resources versus using hosted content for the IAP and uploading a seperate IAP package.


Is it that the IAP hosted content is dowloaded automatically at purchase time?


Also, is there any difference between having the IAP content on Apple's servers and downloaded/downloadable when purchased versus having it on the app bundle, which locates ODR on Apple servers anyway?


My app makes NSBundleResourceRequests for ODR in the main bundle, but checks to see if the non-consumable unlock of the full game has been purchased and makes further ODR requests.


Is it possible that someone can hack my code and request ODR more easily than hosted IAP content?

I can't help with the uploading problems you are having.


The difference between using hosted content versus placing the content in the originnal app bundle is that

1) you can change the hosted content without needing all users to update the app

2) you can add to the hosted content without needing all users to update the app

3) if the hosted content is large, you don't burden all users with downloading it when they purchase the app from the app store.

4) if the hosted content is very large you don't burden any user with downloading it inconveniently through the app store download

Thanks, PBK. Points 1 and 2 are very helpful to know. As for points 3 and 4, I had understood that resources you specify as "on demand" in your bundle are hosted on Apple servers anyway and so IAP content submitted in your bundle would only be downloaded when instructed to by the app.


I think we may be talking at cross purposes here. My question is about ODR vs hosted content. Of course, it's all hosted content, but there's a difference in the terminology from Apple's perspective. With ODR, I submit all content in one bundle but the user only downloads a small, essential part of that when downloading the free app. They progress through the app (a game) to a certain point and then to gain access to the rest of the game, they must purchase the in-app purchase. This means access to more media content. In the ODR scenario, the app accesses the rest of the bundle, which is stored on Apple's servers.


An alternative to this is for me to submit the app without the extra media content. The user still downloads the same essential part from the app store when downloading this free initial part of the game. However, I can submit a separate package of IAP content to iTunes Connect and place that in the IAP area. This package is associated to the app. On purchase, is this IAP package automatically downloaded? Does the app need to make a NSBundleResourceRequest for part or all of its content?


In both cases, Apple hosts the content on its servers.


As you say, any changes to the IAP content needn't mean updating the app in the second scenario, but perhaps it wouldn't in the first scenario either, if the only changes were swapping out media content. If I submit a new build with identical code, but some ODR media file substitution, does the user need to update their app? If it meant updating code, that would be necessary in both scenarios anyway.

>versus having it on the app bundle, which locates ODR on Apple servers anyway?

>IAP content submitted in your bundle would only be downloaded when instructed to by the app.


Define 'bundle'... because anything -in- the application bundle is downloaded as part of/with 'the app', and already on hand for the user, only waiting, as an example, for an IAP to enable user access to those resources/assets. If those resources/assets were already in the app bundle, it wouldn't need to be hosted anywhere.


Quoting the docs"On-demand resources are app contents that are hosted on the App Store and are separate from the related app bundle that you download."


Going back to your original question, what size resources are you expecting? 4GB? 20GB? ...? With everything downloaded/installed/purchased, what is the max size of your (iOS?) app?


>repeatedly receiving the message that my IAP product ID is not recognised


I think the basic step here is to first confirm your contracts in App Store Connect are not waiting on you to accept/agree.


>Is it possible that someone can hack my code and request ODR more easily than hosted IAP content?


Bit of a word salad at work, there, I think. Content is content, and IAP or ODR is just a way to get at it, regardless of where it resides. Maybe I get your point, tho.


If the question is which (IAP or ODR) protects the dev better financially, AFAIK, both rely on apple signed receipts somewhere along the line, so...


If I missed the point of that question, hit me again.

Accepted Answer

You are correct - #3 and #4 do not apply to ODR. I misread your original post and focused on:


Is ......hosted content ... dowloaded .... at purchase time? Also, is there any difference between having the IAP content on Apple's servers and downloaded/downloadable when purchased versus having it on the app bundle,


Like IAP, ODR is not downloaded in the original in the app bundle. When you asked the question this way I assumed you were placing the content directly in the app binary not in ODR.


The way IAP hosted content is downloaded into an app gives the app a bit more control, but that control may not be needed. Also, once downloaded the app must retain hosted content as a file on the device - I think ODR can be swapped in and out of memory as determined by the system. There appears to be little difference as far as the IAP is concerned if you place the ODR tag behind a wall in your app that is opened with a simple IAP. I think #1 and #2 may be different for hosted content than ODR.

Thanks for the clarification. That's very helpful. Do you know if hosted content is automatically downloaded to the device when purchased or whether the app needs to make some kind of call for it? I suppose if the hosted content package has its files tagged as ODR, then an NSBundleResourceRequest would logically be required. But if not, I wonder if some other call is required or whether it just downloads automatically.

> Do you know if hosted content is automatically downloaded to the device when purchased or whether the app needs to make some kind of call for it?


The process is described here:

https://developer.apple.com/documentation/storekit/in-app_purchase/unlocking_purchased_content?language=objc

What is the difference between Apple Hosted Content and On Demand Resources in the context of an in-app purchase?
 
 
Q