Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

BlackMax

macrumors 6502a
Original poster
Jan 14, 2007
901
0
North Carolina
Hi,

I'm new to Xcode and iPhone programming, so pardon the question if it is a really simply fix. I keep getting the following build error and have not been able to determine the root cause. It only happens when I'm building to my iPhone and not when I build to the iPhone simulator. I've successfully built another small App to my iPhone, so I *believe* my development certificate and provisioning profile are OK.

Has anyone seen the following error before:

Code:
Building target “Button Fun” of project “Button Fun” with configuration “Debug”

ProcessingProductPackaging /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.2.1.sdk/Entitlements.plist "/Users/jcridge/My_Projects/Button Fun/build/Button Fun.build/Debug-iphoneos/Button Fun.build/Button Fun.xcent"

<com.apple.tools.product-pkg-utility>: error: CFBundleIdentifier 'com.yourcompany.Button Fun' contains illegal character ' '

I see references to the file "Entitlements.plist", but I've looked and cannot find this file associated with my project.

Any and all assistance is greatly appreciated.

Thanks!
 
CFBundleIdentifier cannot contain a space like 'com.yourcompany.Button Fun' does.

Thanks dejo for the explanation. That makes sense and I did see that space there, but everywhere I looked in Xcode for this project I saw that Xcode placed an underscore in the name such as "button_fun".

Now I'm trying to figure out where to correctly replace this space with an underscore. Is the "CFBundleIdentifier" variable the same thing as the "Bundle intentifier" field in my "Button_Fun-Info.plist" file?

This field contains the following entry:

Code:
com.yourcompany.${PRODUCT_NAME:rfc1034identifier}

So it appears the ${PRODUCT_NAME} variable fills in the application name here?

What is the best way to remove the space in the "CFBundleIdentifier" variable?

Thanks again for you assistance.
 
Very strange......

I have my App ID set up as nnnnnnnnnn.*, where n is an integer.

Used to be I could just enter '*' for the identifier in the target and/or plist (target is looked at before plist for validation FYI. I just found that out and found it useful).

Now I have upgraded to os/sdk 3.0b3 / xcode 3.1.3. It seems that now, '*' is not allowed, so I tried ${PRODUCT_NAME}. However, the product name contains an '_', which is also an illegal char..... pffffftttt! I just ended up entering my firstlast name..... it works, but doesn't really make sense.

I don't know why there are so many illegal chars now, but it's working for me now. I hope this information helps someone :)
 
So it appears the ${PRODUCT_NAME} variable fills in the application name here?

What is the best way to remove the space in the "CFBundleIdentifier" variable?

Thanks again for you assistance.

You can simply replace the ${PRODUCT_NAME:rfc1034identifier} with ButtonFun. or whatever.
 
Question too

I have a similar question.
I submitted an app to the App Store about a month ago and the Bundle Identifier was something like:
<full_reverse_dns_university_and_application_or_suite_name>
I am trying to update that same app, and I made the bundle Identifier the same thing however I am getting that "The bundle identifier contains disallowed characters" error. But when I make it the .com.yourcompany.yourappname I get an error saying something like "The Applications bundle identifier needs to be the same as the minor verison"

Any thoughts? Thanks
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.