swift 关于CocoPods问题

Podfile 文件内容为


platform :ios, ‘9.0’
target "自己的项目名" do

pod 'Alamofire', '~> 4.4.0'

end


当你 输入 

  $ pod install    命令时,出现如下这个错误

Analyzing dependencies

[!] Unable to satisfy the following requirements:


- `Alamofire (~> 4.4.0)` required by `Podfile`


Specs satisfying the `Alamofire (~> 4.4.0)` dependency were found, but they required a higher minimum deployment target.

 大概意思就是说 苹果不允许建包含swift的静态库,不同于OC可以使用平台版本的语言版本。 
针对这种问题,可以做这样的处理:(增加一个行   use_frameworks!       

platform :ios, ‘9.0’
target "CocoPodsTest" do


pod 'Alamofire', '~> 4.4.0'
use_frameworks!


end


警告:

[!] Your Podfile has had smart quotes sanitised. To avoid issues in the future, you should not use TextEdit for editing it. If you are not using TextEdit, you should turn off smart quotes in your editor of choice.

解决办法:不要使用文本编辑去编辑Podfile,使用Xcode编辑,或者使用终端敲命令去编辑。或者输入格式错误,没输入运行版本:$platform:ios, ‘9.0‘


猜你喜欢

转载自blog.csdn.net/jq2530469200/article/details/68491257
今日推荐