Where are ${EXECUTABLE_NAME} and ${PRODUCT_NAME} defined Where are ${EXECUTABLE_NAME} and ${PRODUCT_NAME} defined ios ios

Where are ${EXECUTABLE_NAME} and ${PRODUCT_NAME} defined


The PRODUCT_NAME is defined in the target's Build Settings in the Packaging section. It has the same name by default as your project.

screenshot

Edit:

While PRODUCT_NAME is by default the name of the Target (MyDemoApp in this case). The EXECUTABLE_NAME is a concatenation of:

$EXECUTABLE_PREFIX, $PRODUCT_NAME and $EXECUTABLE_SUFFIX.

See the reference of EXECUTABLE_NAME for details.

Update

The new reference can be found here http://help.apple.com/xcode/mac/8.3/#/itcaec37c2a6

EXECUTABLE_NAME
Specifies the name of the binary the target produces.


I think the $ represents the variable productName & executableName as the $ is used in unix. The variables are set in the build setting of the application. So you should not change the product name directly in the plist file. Instead, go to build settings, search for product name and change it.


Xcode ${<variable_name>} syntax

Xcode variable can be defined on different level and the Resolved one is used. You can use Build Settings -> Levels tab to manage it

enter image description here

All variables are listen in Build Settings. Also every setting has it's own declaration

Product Name - PRODUCT_NAME

These setting are saved in buildSettings block of

<project_name>.xcodeproj/project.pbxproj

You can use Search view to find any variable and Help Inspector to find declaration and other useful information

Some of settings are not exposed by Xcode

EXECUTABLE_NAME

But you are able to get or even to override the value using User-Defined Settings

reader_EXECUTABLE_NAME = $(EXECUTABLE_NAME)
EXECUTABLE_NAME = $EXECUTABLE_PREFIX$PRODUCT_NAME$EXECUTABLE_SUFFIX

[SWIFT_MODULE_NAME, PRODUCT_MODULE_NAME, PRODUCT_NAME, EXECUTABLE_NAME]

[TARGET_NAME]