On-demand resources asset packs invalidated on app update

Hello,

I have an issue using on-demand resources. It happens that on every update the asset packs are always reported to be not present, even if the resources tagged on every asset pack do not change.

This is very annoying since we rarely change the on demand resources on the asset packs, but our users still have to redownload them each time.

I have inconsistent behavior debugging on Xcode directly on a device, so I am only able to consistently reproduce the issue uploading two builds on TestFlight.

I have prepared a test project that I have tested on TestFlight and always reproduce the issue: https://drive.google.com/file/d/1oEH_ZBFjGIDTCrxe7Lu8XsFErFurg6HS/view?usp=sharing

STEPS TO REPRODUCE

  1. Archive the "TestODR iOS" target
  2. Upload it on TestFlight
  3. Download it on a test iOS device and launch it
  4. Tap on "Download" button to get the on-demand resouces (it starts the download of two on-demand packs)
  5. Wait the download until you see "packAvailable = 1" on both packs
  6. Bump both the build and version numbers of the target
  7. Archive the "TestODR iOS" with the versions bumped
  8. Upload the new archive on TestFlight
  9. When it becoums available on TestFlight tap on "Update" button and launch it after the update
  10. When the app is launched you will see "packAvailable = 0" for both packs.

Expected behaviour: After the update we expect to see packAvailable = 1 since no asset have changed between the two versions.

Thanks, Francesco

It happens that on every update the asset packs are always reported to be not present, even if the resources tagged on every asset pack do not change.

Expected behaviour: After the update we expect to see packAvailable = 1 since no asset have changed between the two versions.

This is an expected behavior — resources are tied to a specific app version as part of the app's submission, and the system does not have any notion of understanding whether the files in an asset pack are identical across app versions. That would make a great enhancement request, so I suggest you file that through Feedback Assistant and post the FB number here for reference.

— Ed Ford,  DTS Engineer

Thank you for your reply.

I just opened the enamcement request (FB15508031)

Could you clarify exactly what the expected behaviour is around the actual downloads when ODR are unchanged/similar.

The OP describes a case where the ODR is completely unchanged and would like the package to be immediately available. As you say "the system does not have any notion of understanding whether the files in an asset pack are identical across app versions". So the user/app must request the asset.

Is the download process for the asset in any way optimised?

  • If the asset has small changes, then perhaps it is delivered as a delta, so our users only download a small amount.
  • If the asset is completely unchanged then perhaps the download only involves some meta data (a blank delta) so our users only download a tiny amount.

From our testing it looks like there is no optimisation, but I don't know if that behaviour would be different for end users using the real app store as opposed to what we're seeing with testflight/promo codes.

If it is as it seems, then I think it's quite a significant omission to not optimise the downloads of ODR to use deltas. It means our users will be unnecessarily downloading 100s of MB of data on each minor update. It must be costing Apple millions of dollars across the App Store to send this unnecessary data. It seems to be one of those rare situations where our Android users are getting a far smoother experience than our iOS users.

On-demand resources asset packs invalidated on app update
 
 
Q