使用命令行编译xcode项目并加入版本信息

2022/1/13 6:05:47

本文主要是介绍使用命令行编译xcode项目并加入版本信息,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

xcodebuild -workspace ${SOLUTION_NANE} -scheme ${SCHEME_NAME}  -configuration ${BUILD_CONFIRUATION} 

example:

xcodebuild -workspace Test -scheme translate  -configuration Release

那么如何查看你的工作空间有哪些scheme呢

先cd到工作空间目录下

xcodebuild -list

显示内容

Information about project "MakeFileTest":
    Targets:
        MakeFileTest

    Build Configurations:
        Debug
        Release

    If no build configuration is specified and -scheme is not passed then "Release" is used.

    Schemes:
        MakeFileTest

如果想要添加版本信息

xcodebuild -workspace ${SOLUTION_NANE} -scheme ${SCHEME_NAME}  -configuration ${BUILD_CONFIRUATION} DYLIB_CURRENT_VERSION=${DYLIB_CURRENT_VERSION} DYLIB_COMPATIBILITY_VERSION=${DYLIB_COMPATIBILITY_VERSION}

DYLIB_CURRENT_VERSION表示当前版本

DYLIB_COMPATIBILITY_VERSION 表示最低兼容版本

example:

xcodebuild -workspace Test -scheme translate  -configuration Release DYLIB_CURRENT_VERSION=1.0.1 OMPATIBILITY_VERSION=1.0.0


这篇关于使用命令行编译xcode项目并加入版本信息的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程