ios – xcodebuild工作区和方案

ios – xcodebuild工作区和方案,第1张

概述对于指定工作空间和方案时, xcodebuild命令行工具会发生什么,我有些困惑. 我了解配置的方案在XCode IDE GUI中的工作原理.构建 *** 作列出要构建的目标和每个 *** 作(分析,测试,运行,配置文件,存档)的目标,您选择要执行构建 *** 作的目标. 因此,如果我在构建 *** 作中选择了每个 *** 作(分析,测试,运行,配置文件,存档),那么当我执行以下命令时会发生什么. xcodebuild clean in 对于指定工作空间和方案时,xcodebuild命令行工具会发生什么,我有些困惑.

我了解配置的方案在XCode IDE GUI中的工作原理.构建 *** 作列出要构建的目标和每个 *** 作(分析,测试,运行,配置文件,存档)的目标,您选择要执行构建 *** 作的目标.

因此,如果我在构建 *** 作中选择了每个 *** 作(分析,存档),那么当我执行以下命令时会发生什么.

xcodebuild clean install -workspace MyWorkspace.xcworkspace -scheme MyScheme -configuration AdHoc SYMROOT=PATH DSTROOT=PATH...

它在主xcodeproj中搜索MyScheme.xcscheme,它在XCode中编辑方案时指定了所有此配置.

从这个文件读取xcodebuild是什么?它是否使用AdHoc配置构建配置的目标,并忽略其他所有内容?

解决方法 你几乎在那里,但你的语法有点偏离.
根据 man page:

xcodebuild -workspace workspacename -scheme schemename [-configuration configurationname]
[-sdk [sdkfullpath | sdkname]] [buildaction …] [setting=value …]
[-userdefault=value …]

其中buildaction是以下之一:

buildaction …
Specify a build action (or actions) to perform on the target. Available build actions are:

build       Build the target in the build root (SYMROOT).  This is the default build action.       archive     Archive a scheme from the build root (SYMROOT).  This requires specifying a scheme.       test        Test a scheme from the build root (SYMROOT).  This requires specifying a scheme.       installsrc  copy the source of the project to the source root (SRCROOT).       install     Build the target and install it into the target's installation directory in the dis-                   tribution root (DSTROOT).       clean       Remove build products and intermediate files from the build root (SYMROOT).

在Xcode IDE中,您可以选择通过“产品”菜单进行的构建 *** 作,或者单击并按住IDE左上角的圆形按钮(Run = Play triangle,Test =扳手图标等).

另外,请注意,xcodebuild正在寻找您的构建方案,它可以在.xcproj或.xcworkspace文件中,具体取决于您创建的文件.
(如果您没有手动创建工作区,则将具有.xcproj文件).

您还可以通过Xcode中的“管理方案”设置来确定哪些方案.

总结

以上是内存溢出为你收集整理的ios – xcodebuild工作区和方案全部内容,希望文章能够帮你解决ios – xcodebuild工作区和方案所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1113067.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-29
下一篇 2022-05-29

发表评论

登录后才能评论

评论列表(0条)

保存