ios - 在使用 Xcode 10 生成 dSYM 后运行脚本阶段(构建时)

标签 ios xcode xcode10 dsym run-script

New Features部分,它指出:

  • In the new build system, shell scripts can't rely on the state of build artifacts not listed in other build phases (for example, the Info.plist file or .dSYM files.) Add files the script build phase depends on as explicit input dependencies to the shell script build phase. (40852184)

在以前的Xcode中,脚本执行成功,但现在dSYM文件大小为0时可以执行。

如何让运行脚本阶段仅在生成 dSYM 文件后开始?
如何按照他们的要求创建“对 shell 脚本构建阶段的显式输入依赖性”?

最佳答案

可以在这里找到类似的问题:

Build phase script is running before needed files are created in Xcode 10

您需要将 dSYM 添加为运行脚本阶段的输入文件依赖项: D

dSYM 默认位置是 ${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}

您可以使用一个简短的脚本来测试它并观察它的输出:

#!/bin/sh

if [ ! -d ${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME} ]; then
    echo "Couldn't find dsym file"
    exit 1
fi

stat -x ${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}

关于ios - 在使用 Xcode 10 生成 dSYM 后运行脚本阶段(构建时),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53205108/

相关文章:

regex - 如何使用 swift 正则表达式捕获 unicode 字符

ios - Xcode 10 它不断崩溃,没有错误

ios - 为什么我不能摆脱 libstdc++?

ios - 更新在后台运行的标签的计时器

ios - cellForRowAtIndexPath : Is it XCode template correct?

ios - WatchKit - 我需要在开发者中心注册 Apple Watch 应用程序吗?

ios - 更改 UINavigationBar 后退按钮标题

Xcode 10 Storyboard UI组件不可见并且缓慢吗?

ios - 如何在 ios 中使用子类更改 UITextfield 占位符文本颜色

ios - 以编程方式将 uibutton 添加到详细 View