After I did a clean install of my project Cocoapods which worked just before the clean install, now when I compile there is that error:
Type 'SwinjectStoryboardOption' does not conform to protocol 'ServiceKeyOption'
How do I fix it?
On
The error is caused by moving the Swinject to Swift 5 as part of their 2.7.0 release. At the moment of writing this, fix for it is already merged into master SwinjectStoryboard branch. What is missing is just releasing a new version.
So except of falling back to Swinject 2.6 there is also other temporary workaround (till official release would be made) - fetching the master branch content by defining in Podfile
pod 'SwinjectStoryboard' , :git => 'https://github.com/Swinject/SwinjectStoryboard.git', :branch => 'master'
There is a ticket dedicated to this.
TL;DR
Pretty clean fix is to go to
Podfile.lockand look forSwinject, set it's version to2.6.0instead of2.7.x. It will look like this:As soon as
SwinjectStoryboardreleases a fix, you can just update theSwinjectStoryboardand it will automatically updateSwinjectto a proper version.The issue
It looks like SwinjectStoryboard had a wrong dependency description in their podspec file:
Which resulted in
cocoapodspicking any2.xversion which is higher than2.6. So it mistakenly picks2.7.xwhich is not compatible with currentSwinjectStoryboardversion.Btw looks like the fix is on the way, it is on the master branch but not yet version tagged.