3

When I try to build a Mac OS project in Xcode 4.3.2, it throws out the following warning:

invalid character '$' in Bundle Identifier at column 4. This string must be a uniform type identifier (UTI) that contains only alphanumeric (A-Z,a-z,0-9), hyphen (-), and period (.) characters.

The Bundle identifier for this project is:

com.${COMPANY_NAME}.${PRODUCT_IDENTIFIER:rfc1034identifier}

Is there anything wrong with the Bundle Identifier, that is specified in the plist?

jscs
  • 63,694
  • 13
  • 151
  • 195
Vibhor Goyal
  • 2,405
  • 2
  • 22
  • 35

2 Answers2

3

Note that it is perfectly valid to use _ in variable names.

This warning occurs after the plist has been parsed and the ${VARIABLES} have been replaced with their respective values. You would therefore need to check the actual values of these variables to make sure they do not contain illegal characters such as _.

For the bundle identifier, you can click on your project name in Xcode's file explorer (the first line), select the appropriate target under the TARGET section, then select the General tab. Under Identity/Bundle Identifier check the value.

Xcode Bundle Identifier

Ryan H.
  • 7,374
  • 4
  • 39
  • 46
0

Open your info.plist file and Edit the string that currently says "com.${COMPANY_NAME}.${PRODUCT_IDENTIFIER:rfc1034identifier}".

Completely remove this string and manually enter the bundle id that you created in the iOS provisioning portal.

Mick MacCallum
  • 129,200
  • 40
  • 280
  • 281
  • That would probably solve the issue, but what if I do not want to statically name the identifier? Also this is a Mac OS app not an iOS app, thus has bundle id specified in the provisioning portal. – Vibhor Goyal May 02 '12 at 21:05
  • If you want to keep it dynamic, then the only way to make it work is to check that your applications name, as well as your company name do not include any illegal characters. – Mick MacCallum May 02 '12 at 21:07
  • In the build settings, the COMPANY_NAME was set to $COMPANY_NAME. I updated to use the static company name, which has no ilegal characters, but it still returns me the same warning. – Vibhor Goyal May 02 '12 at 21:20
  • Do the same for the apps name and it should solve the problem. – Mick MacCallum May 02 '12 at 21:21