执行pod install
报错
错误1
1 | NoMethodError - undefined method `to_ary' for #<Pod::Specification name="AFJSONRPCClient"> |
描述:这是cocoapods的一个issue,master上已经fix,目前并没有添加到release版本中(0.39.0)
解决方案:切换到master上1.0.0beta.4版本
1 | pod _1.0.0.beta.4_ --version |
未解决的问题:怎么才能再切换回去
错误2
1 | The dependency MBProgressHUD (~> 0.9.2) is not used in any concrete target. |
描述:低版本的cocoapods没有要求必须填写target,所以之前没有这个习惯,换成高版本的写法就好了
解决方案
低版本:1
2platform :ios, '8.0'
pod 'MBProgressHUD', '~> 0.9.2'
高版本:1
2
3
4platform :ios, '8.0'
target "targetName" do
pod 'MBProgressHUD', '~> 0.9.2'
end