Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where does Xcode store ${PRODUCT_NAME} on the file system?

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.

like image 606
nburk Avatar asked Mar 20 '23 01:03

nburk


2 Answers

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.

like image 200
David Berry Avatar answered Mar 22 '23 14:03

David Berry


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.

like image 38
htafoya Avatar answered Mar 22 '23 16:03

htafoya