Question

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.

Était-ce utile?

La solution

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.

Autres conseils

On Xcode 9.0 you can go to your main project settings > Build Settings and in the search bar find Product Name.

You will have an input field to change this value.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top