在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 默认位置是 ${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/