From bf899e222fb6e47a288977803bd16b1315c2297c Mon Sep 17 00:00:00 2001 From: Bogdan Poplauschi Date: Tue, 13 Oct 2015 14:38:15 +0300 Subject: [PATCH] Fixed the error that was causing the Travis builds to fail The issue was: since CocoaPods 0.38.0, the way pod headers are created on disk changed (see for example https://github.com/core-plot/core-plot/issues/204). This caused the webp/decode.h file to be unaccessible from CocoaPods installations. We could not change the import to libwebp/webp/decode.h since our git clone installation would then fail (as the path for that is Vendors/libwebp/src/webp). The solution was to rely on the COCOAPODS macro to make 2 different imports for Cocoapods and the other installation type. --- SDWebImage/UIImage+WebP.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/SDWebImage/UIImage+WebP.m b/SDWebImage/UIImage+WebP.m index 95c95a8f8..f27a1b6f8 100644 --- a/SDWebImage/UIImage+WebP.m +++ b/SDWebImage/UIImage+WebP.m @@ -8,7 +8,12 @@ #ifdef SD_WEBP #import "UIImage+WebP.h" + +#if !COCOAPODS #import "webp/decode.h" +#else +#import "libwebp/webp/decode.h" +#endif // Callback for CGDataProviderRelease static void FreeImageData(void *info, const void *data, size_t size)