I am setting below two parameters in Config.xcconfig file to fetch appDisplayName
and bundle Identifier
from config file. I did my code in xcconfig file as :
appDisplayName=myapp
appIdentifier=org.prince.myapp
Set in app-Info.plist file as
Bundle identifier = ${appIdentifier}
Bundle display name =${appDisplayName}
add it to project under configurations.
It is working fine as I have given myapp as display name it is showing in simulator/device as it is.
Lets come to the point. I want to know Is there any way to change PRODUCT_NAME
variable value. I set PRODUCT_NAME=custom
in configuration file but this doesn't seems to work.
A build configuration file is a text file with an . xcconfig filename extension that you add to your project. You can create as many build configuration files as you want, and you configure different settings in each one.
Creating and using your xcconfig file To create an xcconfig file, choose File -> New -> File... in your project. In the new file dialog, scroll down until you see the Configuration Settings File in the Other section. You can add configurations for pretty much anything you want.
To create the XCCONFIG file, open the project you want to create the XCCONFIG file for, select File → New → File..., choose "Other" (under iOS and OS X), select "Configuration Settings File," name the file, choose the save location, and click Create.
O yes, I have done it...
set PRODUCT_NAME=kat in Config.xcconfig file and place PRODUCT_NAME variable on
->Targets --> Build Setting -->Packaging --> Product Name as given below in screenshot
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With