Command-line参考(翻译)

目录

Commands

1
pod 

Cocoa库包管理器。

Installation

这个组中列出的命令支持安装和集成Podfile中指定的依赖项。

下面是在用户项目中集成CocoaPods的基本工作流程。

1
2
3
$ touch Podfile
$ vim Podfile
$ pod install
1
$ open *.xcworkspace
1
2
$ vim podfile
$ pod install
1
$ pod outdated
1
$ pod update

Commands:

1
2
3
4
5
6
7
8
9
pod init

pod install

pod update

pod outdated

pod deintegrate

init

1
pod init XCODEPROJ

如果当前目录不存在,则为当前目录创建一个Podfile。如果指定了XCODEPROJ项目文件,或者当前目录中只有一个项目文件,那么将根据项目中定义的目标自动生成目标。

可以在Podfile.default(普通目标)Podfile中指定模板将使用的依赖项列表。Podfile.test(测试目标),这些文件应该存储在/home/travis/.cocoapods/templates文件夹。

继承的选项:

1
2
3
4
5
6
7
8
9
10
--silent    展示什么内容.

--version 展示工具的版本。.

--verbose 展示更多调试信息.

--no-ansi 展示输出不包含ANSI代码.

--help 展示帮助命令.

install

1
pod install 

下载Podfile中定义的所有依赖项,并在./Pods中创建一个Xcode Pods库项目。

Xcode项目文件应该在你的Podfile中指定如下:

1
project `path/to/XcodeProject.xcodeproj`

如果没有指定项目,那么将对Xcode项目进行搜索。如果找到一个以上的Xcode项目,该命令将引发一个错误。

这将配置项目以引用Pods静态库,添加一个构建配置文件,并添加一个post构建脚本来复制Pod资源。

如果遇到问题,可能会返回几个错误代码中的一个。*1通用错误代码*31规格未找到(i。e失效的pod源,Pod名称错误等…)

选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--repo-update

Force running pod repo update before install.

--deployment

Disallow any changes to the Podfile or the Podfile.lock during installation.

--clean-install

Ignore the contents of the project cache and force a full pod installation. This only applies to projects that have enabled incremental installation.

--project-directory=/project/dir/

The path to the root of the project directory.

继承的选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--silent

Show nothing.

--version

Show the version of the tool.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.


update

1
pod update [POD_NAMES ...]

更新由指定的POD_NAMES标识的pod,它是一个以空格分隔的pod名称列表。如果没有指定pod_name,它将更新所有pod,忽略Podfile.lock的内容。此命令用于更新依赖项;pod安装应该用于安装对Podfile的更改。

选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

--sources=https://cdn.cocoapods.org/

The sources from which to update dependent pods. Multiple sources must be comma-delimited.

--exclude-pods=podName

Pods to exclude during update. Multiple pods must be comma-delimited.

--clean-install

Ignore the contents of the project cache and force a full pod installation. This only applies to projects that have enabled incremental installation.

--project-directory=/project/dir/

The path to the root of the project directory.

--no-repo-update

Skip running pod repo update before install.

继承的选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--silent

Show nothing.

--version

Show the version of the tool.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.


outdated

1
pod outdated 

显示当前pod中过时的Podfile.lock,但是但仅限于规范回购,而非本地/外部来源。。

选项:

1
2
3
4
5
6
7
8
9
--project-directory=/project/dir/

The path to the root of the project directory.

--no-repo-update

Skip running pod repo update before install.


继承的选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--silent

Show nothing.

--version

Show the version of the tool.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

deintegrate

pod deintegrate

自v1.0.0.beta.1可用。

1
pod deintegrate [XCODE_PROJECT]

把你的项目从CocoaPods中分离出来。从Xcode项目中删除所有CocoaPods的痕迹。

如果未指定xcodeproj,则将在当前目录中搜索Xcode项目。

选项:

1
2
3
4
5
6

--project-directory=/project/dir/

The path to the root of the project directory.


继承的选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--silent

Show nothing.

--version

Show the version of the tool.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.


Environment

环境

1
pod env

env

1
pod env 

显示Pod环境.

继承的选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--silent

Show nothing.

--version

Show the version of the tool.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.


Browse

浏览

1
2
3
4
5
pod search

pod list

pod try

自v0.0.2可用。

1
pod search QUERY

搜索pods,忽略case,它的名称、摘要、描述或作者匹配查询。如果指定了——simple选项,这将只搜索仓库的名称。

选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36

--regex

Interpret the QUERY as a regular expression.

--simple

Search only by name.

--stats

Show additional stats (like GitHub watchers and forks).

--web

Searches on cocoapods.org.

--ios

Restricts the search to Pods supported on iOS.

--osx

Restricts the search to Pods supported on macOS.

--watchos

Restricts the search to Pods supported on watchOS.

--tvos

Restricts the search to Pods supported on tvOS.

--no-pager

Do not pipe search results into a pager.

继承选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--silent

Show nothing.

--version

Show the version of the tool.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.


list

1
pod list 

列出所有可用的pods.

选项:

1
2
3
4
5
6
7
8
9
--update

Run pod repo update before listing.

--stats

Show additional stats (like GitHub watchers and forks).


继承选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--silent

Show nothing.

--version

Show the version of the tool.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.


try

自v0.29.0可用。

1
pod try NAME|URL

下载带有给定名称(或Git URL)的Pod,根据需要安装它的依赖项并打开它的演示项目。如果提供了一个Git URL,则使用repo的头部。

如果指定了一个Git URL,那么可以提供一个——podspec_name,如果podspec名称由于某种原因与Git repo不同。

选项:

1
2
3
4
5
6
7
--podspec_name=[name]

The name of the podspec file within the Git Repository.

--no-repo-update

Skip running pod repo update before install.

继承的选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--silent

Show nothing.

--version

Show the version of the tool.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.


Specifications

1
2
3
4
5
6
7
8
9
pod spec create

pod spec lint

pod spec cat

pod spec which

pod spec edit

spec create

1
pod spec create [NAME|https://github.com/USER/REPO]

在当前工作目录中创建一个PodSpec,名为NAME.podspec。如果传递了一个GitHub url,spec就会被预填充。

继承的选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.


spec lint

1
pod spec lint [NAME.podspec|DIRECTORY|http://PATH/NAME.podspec ...]

验证NAME.podspec。如果提供了目录,它将验证找到的podspec文件,包括子文件夹。如果该参数被省略,它默认为当前工作目录。

选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
--quick

Lint skips checks that would require to download and build the spec.

--allow-warnings

Lint validates even if warnings are present.

--subspec=NAME

Lint validates only the given subspec.

--no-subspecs

Lint skips validation of subspecs.

--no-clean

Lint leaves the build directory intact for inspection.

--fail-fast

Lint stops on the first failing platform or subspec.

--use-libraries

Lint uses static libraries to install the spec.

--use-modular-headers

Lint uses modular headers during installation.

--sources=https://cdn.cocoapods.org/

The sources from which to pull dependent pods (defaults to https://cdn.cocoapods.org/). Multiple sources must be comma-delimited.

--platforms=ios,macos

Lint against specific platforms (defaults to all platforms supported by the podspec). Multiple platforms must be comma-delimited.

--private

Lint skips checks that apply only to public specs.

--swift-version=VERSION

The SWIFT_VERSION that should be used to lint the spec. This takes precedence over the Swift versions specified by the spec or a .swift-version file.

--skip-import-validation

Lint skips validating that the pod can be imported.

--skip-tests

Lint skips building and running tests during validation.

--analyze

Validate with the Xcode Static Analysis tool.

继承的选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

spec cat

1
pod spec cat [QUERY]

打印名称与标准输出匹配的podspec的内容。

选项:

1
2
3
4
5
6
7
8
9
--regex

Interpret the QUERY as a regular expression.

--show-all

Pick from all versions of the given podspec.


继承的选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.


spec which

1
pod spec which [QUERY]

打印名称与查询匹配的.podspec文件的路径

选项:

1
2
3
4
5
6
7
8
9
--regex

Interpret the QUERY as a regular expression.

--show-all

Print all versions of the given podspec.


继承的选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.


spec edit

1
pod spec edit [QUERY]

打开要编辑的podspec匹配查询。

选项:

1
2
3
4
5
6
7
8
9
--regex

Interpret the QUERY as a regular expression.

--show-all

Pick from all versions of the given podspec.


继承选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.


Trunk

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
pod trunk add-owner

pod trunk info

pod trunk me

pod trunk push

pod trunk register

pod trunk remove-owner

pod trunk deprecate

pod trunk delete

trunk add-owner

自V0.33.0可用。

1
pod trunk add-owner POD OWNER-EMAIL

将具有指定所有者电子邮件的注册用户添加为给定POD的所有者。“所有者”是一个注册用户,允许对pod进行更改,比如推送新版本和添加或删除其他“所有者”。

继承的选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.


trunk info

自V0.33.0可用。

1
pod trunk info NAME

返回关于Pod的信息。

继承的选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.


trunk me

自V0.33.0可用。

1
pod trunk me 

包括关于你的登记的信息,然后是你的所有会话。

这些会话包括当前会话、其他有效会话、未验证会话和过期会话。

继承的选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.


trunk push

自V0.33.0可用。

1
pod trunk push [PATH]

PATH上发布podspec,使其对“trunk”spec-repo的所有用户可用。如果没有提供路径,则默认为当前目录。

在将podspec推送到cocoapods.org之前,这将执行podspec的一个本地lint,包括一个库的构建。但是,您仍然有责任确保发布的podspec能够真正为您的用户工作。因此,建议您首先尝试使用podspec将该库集成到演示和/或实际应用程序中。

如果这是您第一次发布这个pod的规范,那么您将自动注册为这个pod的“所有者”。(注意,这里的“所有者”指的是允许发布新版本并添加其他“所有者”的人,不一定是库的作者。)

选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--allow-warnings

Allows push even if there are lint warnings.

--use-libraries

Linter uses static libraries to install the spec.

--use-modular-headers

Lint uses modular headers during installation.

--swift-version=VERSION

The SWIFT_VERSION that should be used to lint the spec. This takes precedence over a .swift-version file..

--skip-import-validation

Lint skips validating that the pod can be imported.

--skip-tests

Lint skips building and running tests during validation.

继承的选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.


trunk register

自V0.33.0可用。

1
pod trunk register EMAIL [YOUR_NAME]

注册一个新帐户,或创建一个新会话。

如果这是你的第一次注册,你的电子邮件地址和你的名字都是必须的。如果您已经在trunk上注册了,您可以省略YOUR_NAME(除非您想更改它)。

建议您提供会话的描述,以便以后更容易识别。例如,当您想清理会话时。一个常见的示例是指定您正在使用会话的机器的物理位置。

例如:

1
2
3
$ pod trunk register eloy@example.com `Eloy Durán` --description=`Personal Laptop`
$ pod trunk register eloy@example.com --description=`Work Laptop`
$ pod trunk register eloy@example.com

选项:

1
2
3
--description=DESCRIPTION

An arbitrary description to easily identify your session later on..

继承选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.


trunk remove-owner

自V0.33.0可用。

1
pod trunk remove-owner POD OWNER-EMAIL

删除具有指定所有者电子邮件的用户,使其不再是给定POD的所有者。“所有者”是一个注册用户,允许对pod进行更改,比如推送新版本和添加或删除其他“所有者”。

继承的选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.


trunk deprecate

自v1.0.0.beta.1可用。

1
pod trunk deprecate NAME

弃用某个pod。

选项:

1
2
3
4
5
--in-favor-of=OTHER_NAME

The pod to deprecate this pod in favor of..


继承选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.


trunk delete

自v1.0.0.beta.1可用。

1
pod trunk delete NAME VERSION

警告:删除别人依赖的Pod版本通常被认为是不良行为!请考虑使用deprecate命令。

从trunk和master specs repo中删除指定的pod版本。一旦删除,这个版本就不能再推了。

继承的选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.


Repos

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
pod repo add

pod repo add-cdn

pod repo update

pod repo lint

pod repo list

pod repo remove

pod repo push

pod setup

repo add

1
pod repo add NAME URL [BRANCH]

克隆位于/home/travis/.cocoapods/repos的本地spec repos目录中的URL。以后可以按名称引用远程服务器。

选项:

1
2
3
4
5
--progress

Show the progress of cloning the spec repository.


继承选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.


repo add-cdn

1
pod repo add-cdn NAME URL

将URL添加到本地spec repos目录/home/travis/.cocoapods/repos。以后可以按名称引用远程服务器。

继承的选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

repo update

1
pod repo update [NAME]

更新规范repo名称的本地克隆。如果省略名称,则将更新/home/travis/.cocoapods/repos中的所有规范repo。

继承选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

repo lint

1
pod repo lint [NAME|DIRECTORY]

Lints规范repo名称。如果提供了目录,则假定该目录是repo的根目录。最后,如果没有提供名称,这将删除CocoaPods已知的所有spec repo。

选项:

1
2
3
4
--only-errors

Lint presents only the errors.

继承的选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.


repo list

1
pod repo list 

从/home/travis/.cocoapods/repos的本地spec repos目录中列出repos。

选项:

1
2
3
4
--count-only

Show the total number of repos.

继承的选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

repo remove

1
pod repo remove NAME

从/home/travis/.cocoapods/repos的本地spec repos目录中删除远程命名名称。

继承的选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.


repo push

1
pod repo push REPO [NAME.podspec]

验证NAME.podspec或当前工作目录中的*.podspec,在REPO的本地副本(/home/travis/.cocoapods/repos/[REPO])中为pod创建一个目录和版本文件夹,将podspec文件复制到版本目录中,最后将REPO推送到远程。

选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

--allow-warnings

Allows pushing even if there are warnings.

--use-libraries

Linter uses static libraries to install the spec.

--use-modular-headers

Lint uses modular headers during installation.

--sources=https://cdn.cocoapods.org/

The sources from which to pull dependent pods (defaults to all available repos). Multiple sources must be comma-delimited.

--local-only

Does not perform the step of pushing REPO to its remote.

--no-private

Lint includes checks that apply only to public repos.

--skip-import-validation

Lint skips validating that the pod can be imported.

--skip-tests

Lint skips building and running tests during validation.

--commit-message="Fix bug in pod"

Add custom commit message. Opens default editor if no commit message is specified.

--use-json

Convert the podspec to JSON before pushing it to the repo.

--swift-version=VERSION

The SWIFT_VERSION that should be used when linting the spec. This takes precedence over the Swift versions specified by the spec or a .swift-version file.

--no-overwrite

Disallow pushing that would overwrite an existing spec.

继承的选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

setup

1
pod setup 

设置CocoaPods环境。

继承的选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--silent

Show nothing.

--version

Show the version of the tool.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

Libraries

1
2
3
pod lib create

pod lib lint

lib create

1
pod lib create NAME

根据CocoaPods的最佳实践,创建一个用于开发名为NAME的新Pod的仓库。如果指定了包含兼容模板的git repo的模板URL,则将使用该URL代替默认的模板URL。

选项:

1
2
3
4
--template-url=URL

The URL of the git repo containing a compatible template.

继承的选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

lib lint

1
pod lib lint [PODSPEC_PATHS ...]

使用工作目录中的文件验证Pod。

选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
--quick

Lint skips checks that would require to download and build the spec.

--allow-warnings

Lint validates even if warnings are present.

--subspec=NAME

Lint validates only the given subspec.

--no-subspecs

Lint skips validation of subspecs.

--no-clean

Lint leaves the build directory intact for inspection.

--fail-fast

Lint stops on the first failing platform or subspec.

--use-libraries

Lint uses static libraries to install the spec.

--use-modular-headers

Lint uses modular headers during installation.

--sources=https://cdn.cocoapods.org/

The sources from which to pull dependent pods (defaults to https://cdn.cocoapods.org/). Multiple sources must be comma-delimited.

--platforms=ios,macos

Lint against specific platforms (defaults to all platforms supported by the podspec). Multiple platforms must be comma-delimited.

--private

Lint skips checks that apply only to public specs.

--swift-version=VERSION

The SWIFT_VERSION that should be used to lint the spec. This takes precedence over the Swift versions specified by the spec or a .swift-version file.

--include-podspecs=**/*.podspec

Additional ancillary podspecs which are used for linting via :path.

--external-podspecs=**/*.podspec

Additional ancillary podspecs which are used for linting via :podspec. If there are --include-podspecs, then these are removed from them.

--skip-import-validation

Lint skips validating that the pod can be imported.

--skip-tests

Lint skips building and running tests during validation.

--analyze

Validate with the Xcode Static Analysis tool.

继承的选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

IPC

1
2
3
4
5
6
7
8
9
10
11
pod ipc repl

pod ipc spec

pod ipc podfile

pod ipc podfile-json

pod ipc list

pod ipc update-search-index

ipc repl

1
pod ipc repl 

repl监听标准输入上的命令,并将它们的结果输出到标准输出。它接受所有其他ipc子命令。repl将用ASCII CR+LF \n\r来表示输出的结束。

选项:

1
2
3
4
--project-directory=/project/dir/

The path to the root of the project directory.

继承选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

ipc spec

1
pod ipc spec PATH

将podspec转换为JSON并将其打印到STDOUT。

继承的选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.


ipc podfile

1
pod ipc podfile PATH

将Podfile转换为YAML并将其打印到STDOUT。

选项:

1
2
3
4
5
--project-directory=/project/dir/

The path to the root of the project directory.


继承的选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.


ipc podfile-json

1
pod ipc podfile-json PATH

将Podfile转换为JSON并将其打印到STDOUT。

选项:

1
2
3
4
5
--project-directory=/project/dir/

The path to the root of the project directory.


继承选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.


ipc list

1
pod ipc list 

打印到STDOUT一个YAML字典,其中键是规范的名称,每个对应的值是一个具有以下键的字典:-在文件中定义的-version-authors-summary-description-platforms

继承的选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

ipc update-search-index

1
pod ipc update-search-index 

更新搜索索引并将其路径打印到标准输出。搜索索引是一个YAML编码的字典,其中键是Pods的名称,值是一个包含以下信息的字典:- version - summary - description - authors

继承的选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

Plugins

1
2
3
4
5
6
7
8
9
pod plugins list

pod plugins search

pod plugins installed

pod plugins create

pod plugins publish

plugins list

1
pod plugins list 

列出所有已知的插件(根据github.com/CocoaPods/cocoapods-plugins)

继承的选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.


1
pod plugins search QUERY

搜索其是否包含名称插件。查询是一个正则表达式,忽略大小写。

使用——full,它还可以根据作者描述进行搜索。

选项:

1
2
3
4
--full

Search by name, author, and description.

继承的选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.


plugins installed

1
pod plugins installed 

列出所有已安装的插件及其各自的版本。

继承的选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.


plugins create

1
pod plugins create NAME [TEMPLATE_URL]

根据CocoaPods的最佳实践,创建一个名为NAME的新插件开发框架。

如果指定了指向包含兼容模板的git repo的TEMPLATE_URL,则将使用它来替代默认模板。

继承的选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.


plugins publish

1
pod plugins publish 

这个命令只对CocoaPods插件的开发者有用。

它打开一个新的GitHub问题,请求将当前正在开发的插件添加到官方插件列表中。

当前目录应该有一个(而且只有一个).gemspec文件描述CocoaPods插件gem。

继承的选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.


Cache

1
2
3
pod cache list

pod cache clean

cache list

1
pod cache list [NAME]

将pods缓存的内容显示为按pod组织的YAML树输出。如果给出了名称,那么输出中只会包含该pod的缓存。

选项:

1
2
3
4
--short

Only print the path relative to the cache root.

继承的选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.

cache clean

1
pod cache clean [NAME]

删除给定pod的缓存,或者完全清除缓存。

如果请求的pod的不同版本有多个缓存,您将被询问要清除哪个缓存。使用——all来清洗它们。

如果没有给出pod名称,则需要指定——all标志(这是为了避免错误地清除所有缓存)。

选项:

1
2
3
--all

Remove all the cached pods without asking.

继承的选项:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--silent

Show nothing.

--verbose

Show more debugging information.

--no-ansi

Show output without ANSI codes.

--help

Show help banner of specified command.


参考文档