The version of CocoaPods used to generate the lockfile (1.5.3) is higher than the version of the current executable (1.5.2)
The error you are getting is due to your podfile.lock being built with an older version of Cocoapods. All you need to do is to delete your podfile.lock file and run
pod install. This will create a new podfile.lock, with your current dependencies. Note that it should not take too long because your files should already be downloaded, they just need to be linked in said file.
For those like me whose cocoapods version is 1.5.2, you can update cocoapods using
sudo gem install cocoapods
and the problem is solved
For checking pod version use
For those for which cocoapods version is 1.5.3, you can delete podfile.lock and do
pod install. However please note that if the version, of libraries used in your project, is not specified in podfile, then they will be automatically updated to latest vesrion.