mac 系统升级后 Cocoapods1.8.4 pod指令失效
2020-01-12 本文已影响0人
__season____
系统版本: macOS High Sierra 10.14.6
Xcode: 9.2 ——>11.3
每次系统升级,cocoapods 都是一个坑 ,出各种问题,这次cocoapods 1.8.4 就一大堆问题,在网上搜了好多方法最后下面的方法才解决我的问题
dos命令:
//进入repos 目录
$ cd ~/.cocoapods/repos
//删除master
$ pod repo remove master
//删除trunk
seasondeMacBook-Pro:repos 用户名$ pod repo remove trunk
//下载Specs.git
$ git clone https://github.com/CocoaPods/Specs.git
//或者
$ git clone https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git master
下载完成后,Podfile 文件可以这样的写
source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'
platform :ios,'9.0'
target 'Test' do
pod 'Reachability'
pod 'MBProgressHUD'
pod 'SDWebImage'
pod 'YYKit'
pod 'Toast'
pod 'FMDB'
pod 'JSPatch'
pod 'AFNetworking'
pod 'JSONModel'
pod 'Realm'
end
或者这样写
source 'https://github.com/CocoaPods/Specs.git'
platform :ios,'9.0'
target 'Test' do
pod 'Reachability'
pod 'MBProgressHUD'
pod 'SDWebImage'
pod 'YYKit'
pod 'Toast'
pod 'FMDB'
pod 'JSPatch'
pod 'AFNetworking'
pod 'JSONModel'
pod 'Realm'
end
前提是Podfile 的source 你下载成功了,可以这样写
pod 命令 就可以执行成功啦!