本文介绍了如何从bash运行xcode项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个名为xcodebuild的构建脚本.那行得通,但我也想从bash运行该项目.实际上,我想消除在GUI中单击构建并运行"按钮的需要.我正在看xcrun,但是对我来说做起来不太明显

I have a build script calling xcodebuild. that works, but I want to also run the project from bash as well. Effectively I want to negate the need to click "Build and Run" button from the GUI. I'm looking at xcrun but it's not too obvious to me what to do

推荐答案

听起来好像您要运行构建的 product ,而不是项目本身.如果要这样做,您只需要对产品使用bash调用即可.如果您正在构建命令行程序,则在成功构建之后,项目的已构建产品目录中将存在一个带有产品名称的可执行文件.该项目的构建产品目录取决于您对Xcode和该项目的偏好,但是可以在Xcode构建阶段的$BUILT_PRODUCTS_DIR环境变量中确定.

It sounds like you want to run the product of the build, not the project itself. If you want to do that, you just need to use the bash invocation for the product. If you're building a command-line program, then there will be an executable with the product's name in the project's built products directory after a succesful build. The project's built products directory depends on your preferences for Xcode and the project, but can be determined from the $BUILT_PRODUCTS_DIR environment variable within an Xcode build phase.

这篇关于如何从bash运行xcode项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-11 02:01