corona icon indicating copy to clipboard operation
corona copied to clipboard

[iOS]: onDemandResources 'prefetch' type is not working on iPhone

Open usmandotmughal opened this issue 3 years ago • 3 comments

Describe the bug In onDemandResources, when I set type to 'prefetch'. It did not fetch the assets.

To Reproduce Steps to reproduce the behavior:

  1. We can upload a sample project to TestFlight to test the onDemandResources.
  2. Open the test app on iPhone and click the 'ODR Check Folder 2 Assets' button. It will always say assets not downloaded for iPhone X or greater devices.

Target platform and where build was made:

  • Device: iPhoneX or greater.
  • OS: iOS15.5

Additional context I tested the same code with iPhone 7 and 6s and they seem to be working fine.

Sample Project: https://www.dropbox.com/s/i1q80fqz48ecnkg/ODRSampleTest.zip?dl=0

Video of issue: https://user-images.githubusercontent.com/13268636/176410284-faf15fff-eb35-485e-a71c-e31808dbf0cc.mov

usmandotmughal avatar Jun 29 '22 10:06 usmandotmughal

Hello! Pre-fetch is not same as install. It is designed to help download faster, and iOS can start it on the background, when apps are off. You may have to still request the tag to download as well. They probably changed behaviour of pre-fetch over the time so people doesn't use it as 'install'. Try when downloading the app leave phone idling for like 20 minutes...

Shchvova avatar Jun 29 '22 11:06 Shchvova

Thanks. I will test it.

usmandotmughal avatar Jun 29 '22 14:06 usmandotmughal

Hi @Shchvova I tried to fetch 'prefetch' type assets with request and they worked fine. But no matter for how much time I left my app in background they did not download. So I guess I have to make request to download them maybe it's necessary.

usmandotmughal avatar Jun 30 '22 09:06 usmandotmughal