iOS solves the problem that SDWebImage/WebP depends on libwebp and cannot be downloaded

foreword

A few days ago, my colleague reinstalled cocoapods. When pod install libwebp in the project, the installation was always unsuccessful. After checking it, I realized that libwep is a Google source. Then all kinds of solutions appeared in the search results. Let me talk about a relatively simple way.

Solution (making pod private webp components)

1. First delete SDWebImage/WebP in podfile, and then pod install, so that both libwep and WebP in SDWebImage in the project are cleared.
2. Download YYImage and you will find that there will be webp framework inside. insert image description here
3. Take out the files in the webp in SDWebImage separately.
4. The private pod component is xxxWebP. The specific podspec is as follows. insert image description here
Note: If someone has not done pod private components, you can make your own GitHub pod components and use them yourself.

Guess you like

Origin blog.csdn.net/sky_long_fly/article/details/89641106