1、创建PodFile文件:终端进入工程目录,touch Podfile ;
2、编辑PodFile文件:终端输入 vim Podfile ;
platform:ios, ‘7.0’
target 'iCarouselTest' do
pod 'iCarousel', '~> 1.8.2'
end
3、ESC、“:”、wq 退出vim编辑;
4、终端输入: pod install
常见问题:
1、执行pod install 或pod update 命令后,updating local specsrepositories 卡住不动
解决办法:pod install 被墙了,换成新的命令pod install --verbose --no-repo-update
2、报错:Your Podfile has had smart quotes sanitised
解决办法:不要使用文本编辑去编辑Podfile,使用Xcode编辑,或者使用终端敲命令去编辑。(3)
3、项目运行时报错:Thefile “Pods.xcconfig” couldn’t be opened because there is no such file.
解决办法:pod update就可以了。