You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
0 commit comments