mirror of
https://github.com/zhigang1992/PINRemoteImage.git
synced 2026-04-26 05:15:25 +08:00
Make WebP + CocoaPods + use_frameworks! work again
This commit is contained in:
committed by
Garrett Moon
parent
4d2a111c9c
commit
0ef39a8b7f
@@ -1,3 +1,5 @@
|
||||
xcodeproj 'PINRemoteImage.xcodeproj'
|
||||
|
||||
target 'PINRemoteImage', :exclusive => true do
|
||||
pod "PINRemoteImage", :path => "../"
|
||||
pod "PINCache"
|
||||
@@ -5,5 +7,5 @@ target 'PINRemoteImage', :exclusive => true do
|
||||
end
|
||||
|
||||
target 'PINRemoteImage Tests', :exclusive => true do
|
||||
pod "PINRemoteImage", :path => "../"
|
||||
pod "PINRemoteImage/WebP", :path => "../"
|
||||
end
|
||||
|
||||
@@ -32,11 +32,15 @@ PODS:
|
||||
- PINRemoteImage/FLAnimatedImage (1.2.3):
|
||||
- FLAnimatedImage (>= 1.0)
|
||||
- PINRemoteImage/Core
|
||||
- PINRemoteImage/WebP (1.2.3):
|
||||
- libwebp
|
||||
- PINRemoteImage/Core
|
||||
|
||||
DEPENDENCIES:
|
||||
- libwebp
|
||||
- PINCache
|
||||
- PINRemoteImage (from `../`)
|
||||
- PINRemoteImage/WebP (from `../`)
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
PINRemoteImage:
|
||||
@@ -46,6 +50,6 @@ SPEC CHECKSUMS:
|
||||
FLAnimatedImage: e16a1e1cef08e4c509b47e4acbe3923f65c16135
|
||||
libwebp: 68ba2001ba6806ee52837ebd77a551a0b6567e4e
|
||||
PINCache: 9e70271f1bdd60c0465b7208adcc4b6acc1fc376
|
||||
PINRemoteImage: 9dce28a9520f9f5fc502ad04f05b736e54e7cc3b
|
||||
PINRemoteImage: c976954a7b36820808fe0214df49405b012352b3
|
||||
|
||||
COCOAPODS: 0.38.2
|
||||
|
||||
@@ -46,4 +46,10 @@ Pod::Spec.new do |s|
|
||||
fs.source_files = 'Pod/Classes/Image Categories/FLAnimatedImageView+PINRemoteImage.h', 'Pod/Classes/Image Categories/FLAnimatedImageView+PINRemoteImage.m'
|
||||
fs.dependency 'FLAnimatedImage', '>= 1.0'
|
||||
end
|
||||
|
||||
s.subspec 'WebP' do |webp|
|
||||
webp.xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) PIN_WEBP=1' }
|
||||
webp.dependency 'PINRemoteImage/Core'
|
||||
webp.dependency 'libwebp'
|
||||
end
|
||||
end
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
@interface NSData (PINImageDetectors)
|
||||
|
||||
- (BOOL)pin_isGIF;
|
||||
#if __has_include(<webp/decode.h>)
|
||||
#ifdef PIN_WEBP
|
||||
- (BOOL)pin_isWebP;
|
||||
#endif
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
@interface NSData (PINImageDetectors_Deprecated)
|
||||
|
||||
- (BOOL)isGIF __attribute((deprecated("use pin_isGIF")));
|
||||
#if __has_include(<webp/decode.h>)
|
||||
#ifdef PIN_WEBP
|
||||
- (BOOL)isWebP __attribute((deprecated("use pin_isWebP")));
|
||||
#endif
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
return NO;
|
||||
}
|
||||
|
||||
#if __has_include(<webp/decode.h>)
|
||||
#ifdef PIN_WEBP
|
||||
- (BOOL)pin_isWebP
|
||||
{
|
||||
const NSInteger length = 12;
|
||||
@@ -49,7 +49,7 @@
|
||||
return [self pin_isGIF];
|
||||
}
|
||||
|
||||
#if __has_include(<webp/decode.h>)
|
||||
#ifdef PIN_WEBP
|
||||
- (BOOL)isWebP
|
||||
{
|
||||
return [self pin_isWebP];
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
#import <ImageIO/ImageIO.h>
|
||||
|
||||
#if __has_include(<webp/decode.h>)
|
||||
#ifdef PIN_WEBP
|
||||
#import "PINImage+WebP.h"
|
||||
#endif
|
||||
|
||||
@@ -82,7 +82,7 @@ NSData * __nullable PINImagePNGRepresentation(PINImage * __nonnull image) {
|
||||
if ([data pin_isGIF]) {
|
||||
return [PINImage imageWithData:data];
|
||||
}
|
||||
#if __has_include(<webp/decode.h>)
|
||||
#ifdef PIN_WEBP
|
||||
if ([data pin_isWebP]) {
|
||||
return [PINImage pin_imageWithWebPData:data];
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
//
|
||||
//
|
||||
|
||||
#if __has_include(<webp/decode.h>)
|
||||
#ifdef PIN_WEBP
|
||||
|
||||
#ifdef __IPHONE_OS_VERSION_MIN_REQUIRED
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@@ -8,8 +8,12 @@
|
||||
|
||||
#import "PINImage+WebP.h"
|
||||
|
||||
#if __has_include(<webp/decode.h>)
|
||||
#import <webp/decode.h>
|
||||
#ifdef PIN_WEBP
|
||||
#if !COCOAPODS
|
||||
#import "webp/decode.h"
|
||||
#else
|
||||
#import "libwebp/webp/decode.h"
|
||||
#endif
|
||||
|
||||
static void releaseData(void *info, const void *data, size_t size)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user