I solved this problem by running the following command:
sudo chown -R $USER ~/Library/Caches/CocoaPods
and
sudo chown -R $USER ~/.cocoapods
Please replace username and groupname with your Mac login username/groupname.
I solved this problem by running the following command:
sudo chown -R $USER ~/Library/Caches/CocoaPods
and
sudo chown -R $USER ~/.cocoapods
Please replace username and groupname with your Mac login username/groupname.