On demand resources

RSS for tag

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

Posts under On demand resources tag

11 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Code=4099 "Connection invalidated to streaming unzip service."
Hello, I am new to be using on-demand resources in my project, it’s a wonderful idea and concept I have to say! Kudos to whoever invented this! I am facing one problem that I couldn't solve so far: whenever I switch between the TestFlight / App Store / local Xcode builds I receive this error message: Code=4099 "Connection invalidated to streaming unzip service." Does anyone know what this means and how I can resolve it? I saw this other thread where it was recommended to delete & reinstall the app, but that is not always feasible because then all user data from the app is lost as well: https://forums.developer.apple.com/forums/thread/707070 Thanks a lot for any hints!
0
0
94
3w
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 Archive the "TestODR iOS" target Upload it on TestFlight Download it on a test iOS device and launch it Tap on "Download" button to get the on-demand resouces (it starts the download of two on-demand packs) Wait the download until you see "packAvailable = 1" on both packs Bump both the build and version numbers of the target Archive the "TestODR iOS" with the versions bumped Upload the new archive on TestFlight When it becoums available on TestFlight tap on "Update" button and launch it after the update 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
3
0
329
3w
Clarification regarding App Bundle size limits
Hello, There is a table in the On Demand Resources Size Limits documentation that states the size of the thinned App Bundle should be: < 2GB for iOS < 18 < 4 GB for iOS 18+ However we have products on App Store that are already currently close to 4 GB without using ODR. The "Estimated file sizes for Build" in App Store Connect shows download sizes of about 3.5 GB. From the table it seems prior to iOS 18 you were allowed 2 GB + 2 GB initial install and prefetched if you are using ODR 2 GB if you are not using ODR However, since our available apps on the store are already close to 4GB pre iOS 18, we are a bit confused why our products worked and what are the limits. Can an app have 4GB large + 2GB ODR initial install/prefetch on iOS 17 ? Thanks, Dan
1
2
382
Oct ’24
On Demand Resources Not Working in Release Build for Real Device
I have implemented On Demand Resources (ODR) in my iOS app using Swift. The ODR feature works correctly when running the app directly from Xcode 15.3. However, when I archive the app and install the release build on a real device, the ODR feature fails to function as expected. I followed up this doc. https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/On_Demand_Resources_Guide/index.html#//apple_ref/doc/uid/TP40015083-CH2-SW1 I have read that adding specific entitlements for ODR might be necessary, but I'm unsure how to properly configure this.
1
0
438
Jul ’24
how to include secrets file
Hi. My app hits an API. I have the API key stored in a config.plist file. Of course, I don't want to include this file in version control. So I omitted it. I have a workflow that when I push to my main branch, it pushes the newest version to internal testers on test flight. The problem is, the deployed code cannot find the config file, which makes sense. My approach to this problem has been to use resource tags Targets > Resource Tags And I declared that this app should download this resource. I can't figure out how to categorize it as other than download on demand . I would like it to be downloaded immediately with the app. Am I even on the right track here?
1
0
599
Jun ’24
On Demand Resource Crash
When making an NSBundleResourceRequest to request resources, it works fine the first time. However, after calling endAccessingResources and making the request again, the app crashes when interacting with the page。 Xcode 15.0.1 (15A507) iPhone Xs 17.1.2 error prompt: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'CoreUI: CGImageBlockSetRef __CUIImageProviderCopyImageBlockSetWithOptions(void *, CGImageProviderRef, CGRect, CGSize, CFDictionaryRef) unknown pixel format 0 rendition '(null)'' *** First throw call stack: (0x197258870 0x18f57fc00 0x1967c2e54 0x1b34532c4 0x198d46128 0x198d45f84 0x198d30134 0x198d3017c 0x198d30134 0x198d2fe00 0x198d2d54c 0x198d2cae4 0x198d37bf8 0x198d37434 0x198d20390 0x198d1fd28 0x198d061bc 0x198d053c0 0x199467ca0 0x199467c50 0x199466f94 0x199466e04 0x199466d30 0x19a5bbf80 0x1993fe200 0x1993fdc74 0x1993fdb90 0x1993fd708 0x1993fd580 0x1993fd288 0x1993fd21c 0x1993fea3c 0x1993fce8c 0x1993d1c68 0x1993d1990 0x1993fffdc 0x1993ffb58 0x1993ffaa4 0x1993c2694 0x1987d81c0 0x1987d7d48 0x1987de278 0x1987d7574 0x1987d721c 0x1971a1a2c 0x1971a0434 0x19719fb50 0x19719f668 0x1da56a5ec 0x1995bc2b4 0x1995bb8f0 0x100e2e454 0x1b9bf2dcc) libc++abi: terminating due to uncaught exception of type NSException *** Assertion failure in CGImageBlockSetRef __CUIImageProviderCopyImageBlockSetWithOptions(void *, CGImageProviderRef, CGRect, CGSize, CFDictionaryRef)(), CUIThemeRendition.m:1,328
2
0
629
Jan ’24
[ODR] Install & Prefetched Tags not working
Hello there, I'm currently trying to use the ODR system, according to that guide: https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/On_Demand_Resources_Guide/index.html#//apple_ref/doc/uid/TP40015083-CH2-SW1. I followed the guide trough, however my install tags and prefetch tags, seems to not be installed when the app is installed as describe by the documentation. I did add them to the list of install and prefetched tags in the project, nothing seems to be working so far. I tried installing the app directly from Testflight but got to the same result. The request system for the ODR tags work as expected, so far the only way to make my install nor prefetch tags works was to actually call the "beginAccessingResourcesWithCompletionHandler" directly with the wanted tags, I also try to use the "conditionnallyBeginAccessingResourcesWithCompletionHandler" which give me resourcesAvailable is false for the install & prefetch tags. Any help will be more than welcome. Thanks, Jérémy
2
0
852
Aug ’24
On-demand resources suddenly stopped working?
So yesterday I noticed that some of images in my app stopped appearing. All of them were placed in the on-demand resources, that is I've assigned tags to them. Up until yesterday they were working correctly but since then whenever I try to load the assets I get the error message saying: Error Domain=NSCocoaErrorDomain Code=4099 "Connection invalidated to streaming unzip service." My code for loading the asset is pretty straightforward and it was working perfectly fine before: let resourceRequest = NSBundleResourceRequest(tags: ["vinyl"]) defer { resourceRequest.endAccessingResources() } do { if await !resourceRequest.conditionallyBeginAccessingResources() { try await resourceRequest.beginAccessingResources() } } catch { assertionFailure("Vinyl image was not available, error: \(error)") } I'm obviously using it in asynchronous context, but the old method which used completion handler gives me the same error. Has anyone encountered this issue as well? I just updated my devices to iOS 15.5, maybe that update broke on-demand resources? Tested on Xcode 13.4, iOS 15.5
6
6
3k
3w
Prefetched tags (On demand resources)
Hello. I'm trying to make the ODR experience as seamless as possible while reducing the app bundle size same time. According to the documentation, the files associated with the tags placed in the prefetch tag order section should start downloading immediately after installing the app, but my observations show that the resources behave like it's associated with on demand tag. Assuming: I expected that at least few first resources in order will be ready after 10-15 sec after installing and accessing these resources through conditionallyBeginAccessingResource() will return success almost immediately, but it's not. Anyone faced this behaviour? Does this technology is still actual for 2022?
1
0
900
Aug ’24