美文网首页
Pod 命令

Pod 命令

作者: 物非0人非 | 来源:发表于2022-11-27 14:51 被阅读0次

1,有时你可能想使用最前沿的Pod版本。 或者具体的修订
如果是这种情况,您可以在 pod声明中指定它。

pod 'AFNetworking', :git => 'https://github.com/gowalla/AFNetworking.git'
pod 'AFNetworking', :git => 'https://github.com/gowalla/AFNetworking.git', :branch => 'dev'
pod 'AFNetworking', :git => 'https://github.com/gowalla/AFNetworking.git', :tag => '0.7.0'
pod 'AFNetworking', :git => 'https://github.com/gowalla/AFNetworking.git', :commit => '082f8319af'

2,如果你想使用 develop其客户端 / 项目一起使用,你可以使用路径选项。

pod 'AFNetworking', :path => '~/Documents/AFNetworking'

3,Test Specs 可以通过: testspecs选项选择性地包含测试规格。
默认情况下,Pod的测试规格都不包括在内。

pod 'AFNetworking', :testspecs => ['UnitTests', 'SomeOtherTests']

4,Subspecs 当通过Pod名称安装 Pod 时,它将安装所有在podspec 中定义的默认子规范。

pod 'QueryKit/Attribute'
pod 'QueryKit', :subspecs => ['Attribute', 'QuerySet']

5,Source 默认情况下,按照为依赖项匹配指定的顺序搜索在全局级别指定的源。
这种行为可以通过指定具有依赖项的源来修改特定的依赖项:

pod 'PonyDebugger', :source => 'https://github.com/CocoaPods/Specs.git'

6,如果你想在每个 Pod 中使用模块头,你可以使用以下语法:

pod 'SSZipArchive', :modular_headers => true //false

7,Build configurations 默认情况下,目标的所有生成配置中都安装了依赖项。
出于调试目的或其他原因,只能在生成配置列表上启用它们。

pod 'PonyDebugger', :configurations => ['Debug', 'Beta']
pod 'PonyDebugger', :configuration => 'Debug'

相关文章

网友评论

      本文标题:Pod 命令

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