Skip to content

Use an URLSessionConfiguration that can be configured by app #36

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

juanarzola
Copy link

Apps may need custom URLSessionConfiguration in order to function properly. For example, if it uses a custom NSURLProtocol to load image, it needs to set protocolClasses or content loaded by those custom protocols won't load.

CachedAsyncImage starts its sessions using URLSessionConfiguration.default, but because it always returns a copy, that can't be used by the app to configure the default configuration with its own unique requirements. In order to support custom configuration, have CachedAsyncImage use an internal copy of the default config that is exposed to the app via URLSessionConfiguration.cachedAsyncImage that can be modified or set.

@juanarzola juanarzola changed the title Use a URLSessionConfiguration that can be configured by app Use an URLSessionConfiguration that can be configured by app Mar 24, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant