XCTool相关

xctoolfacebook开源的一个命令行工具,用来替代苹果的xcodebuild工具。

功能如下:

  • xcode一样跑测试用例
  • 结构化输出编译测试结果
  • 彩色且方便阅读的编译内容输出

如何安装xctool

最简单的办法是通过homebrew安装xctool

brew update

brew install xctool

搞定

如何使用xctool

打包

path/to/xctool.sh \

  -workspace YourWorkspace.xcworkspace \

  -scheme YourScheme \

  archive

build

path/to/xctool.sh \

  -workspace YourWorkspace.xcworkspace \

  -scheme YourScheme \

  build

测试

path/to/xctool.sh \

  -workspace YourWorkspace.xcworkspace \

  -scheme YourScheme \

  test

 

使用命令如下,上面的命令参照

切换到工程目录下,然后输入如下命令:

xctool -workspace taoappios.xcworkspace -scheme taoappios archive 

生成archive文件

xctool -workspace taoappios.xcworkspace -scheme taoappios build 

编译

usage: xctool [BASE OPTIONS] [ACTION [ACTION ARGUMENTS]] ...

Examples:

    xctool [BASE OPTIONS] clean

    xctool [BASE OPTIONS] build

    xctool [BASE OPTIONS] build-tests [-only TARGET] [-skip-deps]

    xctool [BASE OPTIONS] run-tests [-test-sdk SDK] [-only SPEC] [-freshSimulator] [-freshInstall]

    xctool [BASE OPTIONS] test [-test-sdk SDK] [-only SPEC] [-skip-deps] [-freshSimulator] [-freshInstall]

    xctool [BASE OPTIONS] archive

Base Options:

    -help                    show help

    -workspace PATH          path to workspace

    -project PATH            path to project

    -scheme NAME             scheme to use for building or testing

    -find-target TARGET      Search for the workspace/project/scheme to build the target

    -find-target-path PATH   Path to search for -find-target.

    -find-target-exclude-pathColon-separated list of paths to exclude for -find-target.

    -sdk VERSION             sdk to use for building (e.g. 6.0, 6.1)

    -configuration NAME      configuration to use (e.g. Debug, Release)

    -jobs NUMBER             number of concurrent build operations to run

    -arch ARCH               arch to build for (e.g. i386, armv7)

    -toolchain PATH          path to toolchain

    -xcconfig PATH           path to an xcconfig

    -reporter TYPE[:FILE]    add reporter

    -showBuildSettings       display a list of build settings and values

    -version                 print version and exit

    SETTING=VALUE            Set the build 'setting' to 'value'

Options for 'build-tests' action:

    -only TARGET             build only a specific test TARGET

    -skip-deps               Only build the target, not its dependencies

Options for 'run-tests' action:

    -test-sdk SDK            SDK to test with

    -only SPEC               SPEC is TARGET[:Class/case[,Class2/case2]]

    -freshSimulator          Start fresh simulator for each application test target

    -freshInstall            Use clean install of TEST_HOST for every app test run

Options for 'test' action:

    -test-sdk SDK            SDK to test with

    -only SPEC               SPEC is TARGET[:Class/case[,Class2/case2]]

    -skip-deps               Only build the target, not its dependencies

    -freshSimulator          Start fresh simulator for each application test target

    -freshInstall            Use clean install of TEST_HOST for every app test run



xctoolfacebook开源的一个命令行工具,用来替代苹果的xcodebuild工具。

功能如下:

  • xcode一样跑测试用例
  • 结构化输出编译测试结果
  • 彩色且方便阅读的编译内容输出

如何安装xctool

最简单的办法是通过homebrew安装xctool

brew update

brew install xctool

搞定

如何使用xctool

打包

path/to/xctool.sh 

  -workspace YourWorkspace.xcworkspace 

  -scheme YourScheme 

  archive

build

path/to/xctool.sh 

  -workspace YourWorkspace.xcworkspace 

  -scheme YourScheme 

  build

测试

path/to/xctool.sh 

  -workspace YourWorkspace.xcworkspace 

  -scheme YourScheme 

  test



XCTool相关

xctoolfacebook开源的一个命令行工具,用来替代苹果的xcodebuild工具。

功能如下:

  • xcode一样跑测试用例
  • 结构化输出编译测试结果
  • 彩色且方便阅读的编译内容输出

如何安装xctool

最简单的办法是通过homebrew安装xctool

brew update

brew install xctool

搞定

如何使用xctool

打包

path/to/xctool.sh \

  -workspace YourWorkspace.xcworkspace \

  -scheme YourScheme \

  archive

build

path/to/xctool.sh \

  -workspace YourWorkspace.xcworkspace \

  -scheme YourScheme \

  build

测试

path/to/xctool.sh \

  -workspace YourWorkspace.xcworkspace \

  -scheme YourScheme \

  test

 

使用命令如下,上面的命令参照

切换到工程目录下,然后输入如下命令:

xctool -workspace taoappios.xcworkspace -scheme taoappios archive 

生成archive文件

xctool -workspace taoappios.xcworkspace -scheme taoappios build 

编译

usage: xctool [BASE OPTIONS] [ACTION [ACTION ARGUMENTS]] ...

Examples:

    xctool [BASE OPTIONS] clean

    xctool [BASE OPTIONS] build

    xctool [BASE OPTIONS] build-tests [-only TARGET] [-skip-deps]

    xctool [BASE OPTIONS] run-tests [-test-sdk SDK] [-only SPEC] [-freshSimulator] [-freshInstall]

    xctool [BASE OPTIONS] test [-test-sdk SDK] [-only SPEC] [-skip-deps] [-freshSimulator] [-freshInstall]

    xctool [BASE OPTIONS] archive

Base Options:

    -help                    show help

    -workspace PATH          path to workspace

    -project PATH            path to project

    -scheme NAME             scheme to use for building or testing

    -find-target TARGET      Search for the workspace/project/scheme to build the target

    -find-target-path PATH   Path to search for -find-target.

    -find-target-exclude-pathColon-separated list of paths to exclude for -find-target.

    -sdk VERSION             sdk to use for building (e.g. 6.0, 6.1)

    -configuration NAME      configuration to use (e.g. Debug, Release)

    -jobs NUMBER             number of concurrent build operations to run

    -arch ARCH               arch to build for (e.g. i386, armv7)

    -toolchain PATH          path to toolchain

    -xcconfig PATH           path to an xcconfig

    -reporter TYPE[:FILE]    add reporter

    -showBuildSettings       display a list of build settings and values

    -version                 print version and exit

    SETTING=VALUE            Set the build 'setting' to 'value'

Options for 'build-tests' action:

    -only TARGET             build only a specific test TARGET

    -skip-deps               Only build the target, not its dependencies

Options for 'run-tests' action:

    -test-sdk SDK            SDK to test with

    -only SPEC               SPEC is TARGET[:Class/case[,Class2/case2]]

    -freshSimulator          Start fresh simulator for each application test target

    -freshInstall            Use clean install of TEST_HOST for every app test run

Options for 'test' action:

    -test-sdk SDK            SDK to test with

    -only SPEC               SPEC is TARGET[:Class/case[,Class2/case2]]

    -skip-deps               Only build the target, not its dependencies

    -freshSimulator          Start fresh simulator for each application test target

    -freshInstall            Use clean install of TEST_HOST for every app test run


你可能感兴趣的:(XCTool相关)