xcode xcodebuild - 设置构建目录不会生成 dSYM

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/21850269/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 04:40:04  来源:igfitidea点击:

xcodebuild - setting build dir doesn't generate dSYM

iosobjective-cxcodexcodebuild

提问by John S

I am doing an archive with xcodebuild (xcode 5) through the command line as so:

我正在通过命令行使用 xcodebuild (xcode 5) 进行存档,如下所示:

xcodebuild -project MyProject.xcodeproj -scheme MyScheme -sdk iphoneos7.0 -configuration Release archive CODE_SIGN_IDENTITY="iPhone Distribution: My ID" -archivePath archive/MyArchive.xcarchive -xcconfig Config/MyReleaseConfig.xcconfig CONFIGURATION_BUILD_DIR=$SRCROOT/build/$CONFIGURATION$EFFECTIVE_PLATFORM_NAME

When I run this, I get my xcarchive generated and console output seems ok. However, when I explore the contents of the archive there is nothing under dSYM. Project settings are verified ok. If I run the same command as above BUT omit the CONFIGURATION_BUILD_DIRbit, I get the dSYM as expected. Do you know if there's a solution for this (i.e. should anything else be set). I want to have control over the build dir.

当我运行它时,我生成了我的 xcarchive 并且控制台输出似乎没问题。然而,当我探索档案的内容时,dSYM 下没有任何内容。项目设置验证正常。如果我运行与上面相同的命令但省略该CONFIGURATION_BUILD_DIR位,我会按预期获得 dSYM。您知道是否有解决方案(即是否应设置其他任何内容)。我想控制构建目录。

EDIT:

编辑:

I've tried setting explicitly from command line (as opposed to in my scheme settings):

我已经尝试从命令行明确设置(而不是在我的方案设置中):

DEBUG_INFORMATION_FORMAT="dwarf-with-dsym"

and pos-processing to YES. Still no joy.

和后处理为 YES。还是没有快乐。

Thanks.

谢谢。

回答by Artur Kucaj

Check again build settings. Take a look at Debug Information Format, it should have DWARF with dSYM fileenter image description here

再次检查构建设置。看看调试信息格式,它应该有DWARF 和 dSYM 文件在此处输入图片说明

For futher information take a look OS X Man Pages xcodebuildand Xcode Build Setting Reference

有关更多信息,请查看OS X 手册页 xcodebuildXcode 构建设置参考

回答by Acton

xcodebuild -project MyProject.xcodeproj -scheme MyScheme -sdk iphoneos7.0 -configuration Release archive CODE_SIGN_IDENTITY="iPhone Distribution: My ID" -archivePath archive/MyArchive.xcarchive -xcconfig Config/MyReleaseConfig.xcconfig CONFIGURATION_BUILD_DIR=$SRCROOT/build/$CONFIGURATION$EFFECTIVE_PLATFORM_NAME

what's your config about DEBUG_INFORMATION_FORMAT in MyReleaseConfig.xcconfig?

MyReleaseConfig.xcconfig 中关于 DEBUG_INFORMATION_FORMAT 的配置是什么?