{"id":18013709,"url":"https://github.com/ide/webasdkimagemanager","last_synced_at":"2025-03-26T16:33:05.157Z","repository":{"id":26358307,"uuid":"29807371","full_name":"ide/WebASDKImageManager","owner":"ide","description":"Image downloader and cache for AsyncDisplayKit that uses SDWebImage","archived":false,"fork":false,"pushed_at":"2017-03-28T21:57:36.000Z","size":28,"stargazers_count":123,"open_issues_count":3,"forks_count":21,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-22T03:31:50.390Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ide.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-25T08:07:07.000Z","updated_at":"2024-01-14T17:28:30.000Z","dependencies_parsed_at":"2022-09-04T01:00:47.431Z","dependency_job_id":null,"html_url":"https://github.com/ide/WebASDKImageManager","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ide%2FWebASDKImageManager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ide%2FWebASDKImageManager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ide%2FWebASDKImageManager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ide%2FWebASDKImageManager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ide","download_url":"https://codeload.github.com/ide/WebASDKImageManager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245692946,"owners_count":20657036,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-30T03:22:46.466Z","updated_at":"2025-03-26T16:33:04.679Z","avatar_url":"https://github.com/ide.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WebASDKImageManager\n\n[![Version](https://img.shields.io/cocoapods/v/WebASDKImageManager.svg?style=flat)](http://cocoadocs.org/docsets/WebASDKImageManager)\n[![License](https://img.shields.io/cocoapods/l/WebASDKImageManager.svg?style=flat)](http://cocoadocs.org/docsets/WebASDKImageManager)\n[![Platform](https://img.shields.io/cocoapods/p/WebASDKImageManager.svg?style=flat)](http://cocoadocs.org/docsets/WebASDKImageManager)\n\n# Notice\n\n[AsyncDisplayKit](https://github.com/facebook/AsyncDisplayKit) now uses Pinterest's PINRemoteImage and PINCache if you include them as dependencies. They provide the functionality that WebASDKImageManager originally set to provide and manage memory more efficiently because they work more tightly with AsyncDisplayKit. Unless you specifically wish to use SDWebImage, you should use AsyncDisplayKit's default functionality.\n\n---\n\nAn image downloader and cache for [AsyncDisplayKit](https://github.com/facebook/AsyncDisplayKit) that uses [SDWebImage](https://github.com/rs/SDWebImage). This is an implementation of `ASImageDownloaderProtocol` and `ASImageCacheProtocol` that is compatible with `ASNetworkImageNode`.\n\nBy default, `ASNetworkImageNode` does not cache images and does not coalesce network requests for the same image. SDWebImage does both of these. With WebASDKImageManager, you get the image downloading and caching optimizations of SDWebImage and the asynchronous layout and layer precompositing features of ASDK.\n\n# Installation\n\nWebASDKImageManager is available through [CocoaPods](http://cocoapods.org). To install it, simply add the following line to your Podfile:\n\n```ruby\npod \"WebASDKImageManager\"\n```\n\n# Usage\n\nThe easiest way to use WebASDKImageManager is an initializer it provides in a category on `ASNetworkImageNode`.\n\n```objc\nASNetworkImageNode *imageNode = [[ASNetworkImageNode alloc] initWithWebImage];\n// Setting the URL property will automatically access the memory and disk\n// caches, and download and cache the image if necessary\nimageNode.URL = imageURL;\n```\n\n## Configuration\n\nBy default, image downloading and caching is handled by a shared `WebASDKImageManager` instance. You can get a reference to the shared manager by calling `[SDWebASDKImageManager sharedManager]`. Its `webImageOptions` property is the way to configure the downloading and caching behavior for all ASNetworkImageNode instances that used the shared manager.\n\n```objc\nSDWebASDKImageManager *defaultManager = [SDWebASDKImageManager sharedManager];\n// No longer try to download images that were previously unavailable\ndefaultManager.webImageOptions \u0026= ~SDWebImageRetryFailed;\n```\n\n### Defaults\n\nThe default options are `SDWebImageRetryFailed` and `SDWebImageContinueInBackground`, which are generally what you want. See SDWebImage's `SDWebImageOptions` enum for all of the supported options.\n\n### Configuring a Single Image Node\n\nSometimes you may want to configure an image node differently than the default. You can do this by creating a new `WebASDKImageManager` that is configured to meet your needs.\n\n```objc\nSDWebImageManager *webImageManager = [SDWebImageManager sharedManager];\nSDWebASDKImageManager *asyncImageManager =\n  [[SDWebASDKImageManager alloc] initWithWebImageManager:webImageManager];\nasyncImageManager.webImageOptions = SDWebImageRetryFailed | SDWebImageCacheMemoryOnly;\n```\n\n`WebASDKImageManager` conforms to `ASImageDownloaderProtocol` and `ASImageCacheProtocol`, so you can use your new manager to create a new image node.\n\n```objc\nASNetworkImageNode *imageNode = [[ASNetworkImageNode alloc] initWithCache:asyncImageManager \n                                                               downloader:asyncImageManager];\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fide%2Fwebasdkimagemanager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fide%2Fwebasdkimagemanager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fide%2Fwebasdkimagemanager/lists"}