Cocoapods error: 'Unable to read the license file'

I get this frequently. This works for me.

  1. pod deintegrate
  2. pod setup
  3. pod install

From terminal I run these commands altogether like below

pod deintegrate && pod setup && pod install

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:

  1. First close Xcode.
  2. List item
  3. Delete the Pods folder from your project
  4. Delete the .xcworkspace file,
  5. Delete the Podfile.lock file
  6. 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:

  1. Remove the tag from the git repo
  2. Make sure the LICENSE file has been committed to the git repo
  3. Add the tag to the git repo again
  4. run pod cache clean --all
  5. run pod spec lint again

It should now work.