Referring to this question where it was asked where to find ${PRODUCT_NAME} in Xcode itself, I would like to know where (so in which file) Xcode stores the value of the ${PRODUCT_NAME} on the file system?
I want to write a build script that is able to automatically access this variable and change the product name without using Xcode.
It's in MyProject.xcodeproj/project.pbxproj.
Although in this case you'll probably find you're better served by not actually changing the PRODUCT_NAME, but by changing whatever it is you're using PRODUCT_NAME for. Even then you'll probably find that the best approach is to use an .xcconfig file, which has a public format instead of the pbxproj file which has a rather arcane NextStep format.