Podfile

作者: onavo | 来源:发表于2015-09-16 22:31 被阅读190次

在终端上,创建 Podfile 文件的,首先在终端里,用 cd 一直到找到你的项目的根目录,然后输入命令行:pod init ,一个默认的 Podfile 就自动被创建了。终端输入 :open -a Xcode Podfile 通过 Xcode 打开 Podfile 文件;默认的 Podfile 文件看起来是这样的:

Uncomment this line to define a global platform for your project

platform :ios, '6.0'

target do
end
target do
end

用 :
platform :ios, "8.0"
use_frameworks!
代替注释;
use_frameworks 就是那些你想添加入工程的第三方库;
例如:pod 'Alamofire', '1.2.3' 等,每一行只添加一个第三方库,如要添加多个,就分多行写。

都添加完,就保存。
最后在终端输入命令行:pod install ;如是更新的,用 pod update

相关文章

  • pod命令行操作

    首先:cd 项目touch Podfile一个文件vim Podfile进入Podfile文件在Podfile文件...

  • (四)Podfile vs. Podfile.lock

    下面是 Podfile 与 Podfile.lock 两个文件的对比: Podfile: Podfile.lock:

  • cocoapods 使用

    1 cd 空格 路径 2 touch Podfile 编辑 Podfile文件 1)输入 vim Podfile,...

  • CocoaPods的Podfile文件编写

    一、Podfile文件? 二、Podfile语法参考 Podfile Syntax Reference官网 1)永...

  • git 代码合并冲突

    Auto-merging Podfile.lock podfile.lock合并冲突 podfile.lock 该...

  • Flutter 项目升级报错处理

    1、flutter Warning: Podfile is out of dateWarning: Podfile...

  • Pod 新建项目

    1,打开命令行 cd 你的项目目录 2,新建Podfile touch Podfile 3, 编辑Podfile ...

  • cocoapods-prefer解析

    hook cocoapods的类 podfile 在podfile.rb文件实现在podfile调用的函数,传递参...

  • Podfile 库版本运算符

    一个简单的podfile: 一个更简单的podfile: 一个更更简单的podfile: 一个复杂的podfile...

  • Podfile

    什么是 Podfile Podfile是一个规范,用于描述一个或多个Xcode项目的目标依赖关系。 该文件应该简单...

网友评论

      本文标题:Podfile

      本文链接:https://www.haomeiwen.com/subject/ygrbcttx.html