Cocoapods error: 'Unable to read the license file'
In my case this was related to someone in my team committing their .xcworkspace
file to the repository, which meant running pod install
gave me the licence warnings but at the same time, did not install my pods properly.
This is how I resolved it:
- First close Xcode.
- List item
- Delete the
Pods
folder from your project - Delete the
.xcworkspace
file, - Delete the
Podfile.lock
file - And then finally, for good measure delete the
DerivedData
folder
Now run pod install
and the issue should be fixed.
I just had this issue today, seems to have been caused by my cache being corrupted somehow; perhaps a charset issue? No idea, but the solution that worked for me was the bash script in this Gist.
It clears the cocoapods cache so that you get a fresh copy of all required when you next run pod install
. Fixed my problem immediately, confirming my suspicion, and hasn't reoccurred since.
My problem was that when I initially added the tag to git, the LICENSE file was not there. I fixed this by:
- Remove the tag from the git repo
- Make sure the LICENSE file has been committed to the git repo
- Add the tag to the git repo again
- run
pod cache clean --all
- run
pod spec lint
again
It should now work.
I get this frequently. This works for me.
- pod deintegrate
- pod setup
- pod install
From terminal I run these commands altogether like below
pod deintegrate && pod setup && pod install
run
pod deintegrate
then
pod cache clean --all
and
pod install