TARGET_BUILD_BIN="$TARGET_BUILD_DIR"/"$PRODUCT_NAME"
BR=$(/usr/bin/printenv BUILD_ROOT)
if [[ $BR == *"DerivedData"* ]]; then
echo "The substring 'DerivedData' is in the full string."
echo "BR: $BR"
echo $TARGET_BUILD_BIN
open "$TARGET_BUILD_DIR"
fi
将上述脚本放到 Run Script中,comand+shift+i完成后会自动打开结果目录