Sfoglia il codice sorgente

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.
Bogdan Poplauschi 10 anni fa
parent
commit
bf899e2
1 ha cambiato i file con 5 aggiunte e 0 eliminazioni
  1. 5 0
      SDWebImage/UIImage+WebP.m

+ 5 - 0
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)