Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expose protocol to get image data from the cache plus WebP cleanup
## Summary Recently we made several headers private in Cocoapods. However, some clients were reaching directly into PINRemoteImage's memory cache (PINCache) and pulling out `PINRemoteImageMemoryContainer` and doing whatever with it. To support that use case without exposing more than necessary publicly, introduce the `PINRemoteImageDataConvertible` protocol and have `PINRemoteImageMemoryContainer` conform to it. So if previously the code was: ``` PINRemoteImageMemoryContainer *container = [[PINRemoteImageManager sharedImageManager].cache objectFromMemoryForKey:imageURL.absoluteString]; NSData *cachedImageDataForURL = [container data]; ``` it can be ``` id<PINRemoteImageDataConvertible> container = [[PINRemoteImageManager sharedImageManager].cache objectFromMemoryForKey:imageURL.absoluteString]; NSData *cachedImageDataForURL = [container data]; ``` Also, previous changes required `PIN_WEBP` to be defined in the project settings or it would fail to compile. That's been changed to always build. If _not_ specified it will default to `1`. ## Test plan Run `make all` to run tests and build everything
- Loading branch information