J’ouvre le terminal je vais dans le répertoire « example » et je tape « pod install »
j’ai ce message :
Analyzing dependencies
Adding spec repo `trunk` with CDN `https://cdn.cocoapods.org/`
Downloading dependencies
Installing SDWebImage (5.10.4)
Installing SDWebImageAVIFCoder (0.8.0)
Installing libaom (1.0.2)
Installing libavif (0.8.1)
Installing libdav1d (0.8.0)
Generating Pods project
Integrating client project
Pod installation complete! There are 3 dependencies from the Podfile and 5 total pods installed.
[!] The `SDWebImageAVIFCoder_Tests [Debug]` target overrides the `HEADER_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods-SDWebImageAVIFCoder_Tests/Pods-SDWebImageAVIFCoder_Tests.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
et quand j’essaie de compiler l’exemple macOS dans Xcode, j’ai ce message d’erreur :
Directory not found for option '-L/Users/user/Library/Developer/Xcode/DerivedData/SDWebImageAVIFCoder-avwnzlmckkghozaxqdmbdvoctahr/Build/Products/Debug/SDWebImage-macOS'
Directory not found for option '-L/Users/user/Library/Developer/Xcode/DerivedData/SDWebImageAVIFCoder-avwnzlmckkghozaxqdmbdvoctahr/Build/Products/Debug/SDWebImageAVIFCoder-macOS'
Directory not found for option '-L/Users/user/Library/Developer/Xcode/DerivedData/SDWebImageAVIFCoder-avwnzlmckkghozaxqdmbdvoctahr/Build/Products/Debug/libaom-macOS'
Directory not found for option '-L/Users/user/Library/Developer/Xcode/DerivedData/SDWebImageAVIFCoder-avwnzlmckkghozaxqdmbdvoctahr/Build/Products/Debug/libavif-macOS'
Directory not found for option '-L/Users/user/Library/Developer/Xcode/DerivedData/SDWebImageAVIFCoder-avwnzlmckkghozaxqdmbdvoctahr/Build/Products/Debug/libdav1d-macOS'
Library not found for -lSDWebImage-macOS
J’ai été voir le projet GitHub et tu peux utiliser Swift Package Manager (SPM) qui est intégré à Xcode.
Il faut dans un premier temps que lie ton compte GitHub avec Xcode, si cela n’est pas déjà fait et suivre ce petit Tuto que j’avais fait sur un autre poste.
Pour toi, il faut chercher SDWebImageAVIFCoder ou l’URL du repo GitHub fonctionne aussi.
merci, les dépendances sont apparues dans la barre de gauche
mais maintenant j’ai une erreur à la compilation
/Users/user/Library/Developer/Xcode/DerivedData/SDWebImageAVIFCoder-ctahr/SourcePackages/checkouts/SDWebImageAVIFCoder/SDWebImageAVIFCoder/Classes/Conversion.m:15:9: ‹ ColorSpace.h › file not found
il manque le fichier « ColorSpace.h » dans la dépendance SDWebImageAVIFCoder
Sinon, vas dans File/Swift Packages et de faire Resolve Package Versions ou Reset Package Caches, si t’es bien en version 0.8.0, dans le cas contraire clique sur Update to Latest Package Versions.
EDIT : Il y a un bug dans le projet ! J’ai réglé le problème dans ma fork du repo et fait un pull requests pour corriger cette erreur dans le repo principal, mais je ne sais pas quand il sera accepté.
Un autre problème maintenant que j’ai supprimé les fichiers Pod :
/Users/user/Desktop/SDWebImageAVIFCoder-master/Example/SDWebImageAVIFCoder_Example macOS/ViewController.m:10:9: ‹ SDWebImage/SDWebImage.h › file not found