创建Podfile文件

创建Podfile

1. 打开终端

2. cd 工程路径

3. 输入 vim Podfile回车

4. 保存文件(:wq)

5. 打开生成的Podfile文件

platform:ios,'8.0'
target '工程名' do
pod 'AFNetworking', '~> 3.0'
end

创建报错

Found a swap file by the name ".podfile.swp"

解决办法:

1. cd 进入工程目录

2. ls -a //查看当前目录下的文件

3. rm -rf .podfile.swp // 强制删除

4. 重复上面的创建

你可能感兴趣的:(创建Podfile文件)