1

我正在尝试通过终端构建我的 XCode 项目。我想使用 Xcode 的Product > Build for > Profiling选项。到目前为止,我有:

xcodebuild -project "MyGame.xcodeproj" -target "MyGameEditor - Mac" -destination 'name=My Mac 64-bit' -configuration Profile

该项目构建但不是用于分析。我收到配置“配置文件”不存在的错误。

任何帮助表示赞赏。

4

1 回答 1

1

What you are trying to sepcify with -configuration is the build configuration, not the build action. Unless you have added extra configurations to your project, you only have "Debug" and "Release" configurations.

What Xcode does when you tell it to profile is it builds the configuration that your scheme specifies to use when profiling, launches the simulator, installs the app, then launches Instruments.

So you need to do a similar thing with two command line calls, one to xcodebuild, one to instruments.

Some helpful links that should help you figure out what you need to do:

http://blog.manbolo.com/2013/04/09/launching-uiautomation-tests-in-command-line

Can the UI Automation instrument be run from the command line?

It is also worth noting that rather than specifying a target and configuration, you should just specify a scheme which provides both and other optional additional features.

于 2014-06-09T18:23:29.573 回答