I too am having this problem. I keep getting an error based on unmatched parentheses in a generated file,
<project>.build/Script-CEC03A37266E7CBC00D5745A.sh: line 4: unexpected EOF while looking for matching `"'
That file contains the following:
#!/bin/sh
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion "$PRODUCT_SETTINGS_PATH")
buildNumber=$(($buildNumber + 1))
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "$PRODUCT_SETTINGS_PATH"
As you can see, the 2nd line has an odd parens(“).
I’ve tried searching on the error and more and banging my head on the screen and neither worked. Making the 2nd line
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$PRODUCT_SETTINGS_PATH")
...didn't work, the file gets overwritten.