Search code examples
xcodexcode-template

What are the build setting modifiers in Xcode called?


I've seen some build settings being used like

$(PRODUCT_NAME:identifier)

Using :upper also makes the setting value uppercase, but I don't know what those are called and can't find any documentation. Does anyone know their name or where the documentation is to use them properly?


Solution

  • The file /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Versions/A/DevToolsCore has a bunch of these:

    [ 09:22 root@MacBookPro / ]# strings /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Versions/A/DevToolsCore | egrep "(^:|^[a-z0-9]+$)"
    :children.count=%lu
    :name='%@'
    :File='%@':Line=%lu:RefType=%@
    :fileRef=%@:timestamp=%lu
    :char-range=%@
    :line-range=%@
    :<range-type-%lu>=%@
    :name='%@'
    :name=%@:path='%@'
    :name='%@'
    :name='%@':buildSettings(%lu)=%@
    :path='%@'
    :quote
    :identifier
    :rfc1034identifier
    :dir
    :abs
    :remoteRef='%@'
    :File='%@':Head Revision=%@:Active Branch=%@
    :scmProprties='%@':sandboxEntry='%@'
    .... SNIP ....
    upper
    environment
    diagnostics
    type
    category
    description
    path
    kind
    message
    ranges
    alternate
    start
    edges
    location
    file
    

    Found this as well: DevToolsCore Framework Reference. Looks like an API for the Framework (- (id)initWithName:(id)arg1 productTypeIdentifier:(id)arg2).

    Couldn't find any other documentation for it though, just this SO question (xcode-info-plist-build-variable-product-namerfc1034identifier-seems-complete).