3

I'm able to change my Product name with CLI xcodebuild but when I open my project I still have the old name. I would like to affect my product name's project permanently with CLI.

Is it possible ? Or perhaps I'm doing something wrong :

/usr/bin/xcodebuild -configuration Debug PRODUCT_NAME="NewName"
madLokesh
  • 1,860
  • 23
  • 49
Pierre
  • 10,593
  • 5
  • 50
  • 80

2 Answers2

5

Passing PRODUCT_NAME to xcodebuild invocation will not change the product name in project but only in this particular build. You need to set it via Xcode in GUI mode if it needs to be done permanently. Look here

Community
  • 1
  • 1
Opal
  • 81,889
  • 28
  • 189
  • 210
2

Try the following:

Hint 1

how-to-change-the-product-name-with-command-line-builds

/usr/bin/xcodebuild -configuration Debug BUILD PRODUCT_NAME="NewName".

You might have to add BUILD keyword there.

Make sure you have CLEAN your configuration as well

madLokesh
  • 1,860
  • 23
  • 49