Should the rfc1034identifier be removed from the CFBundleIdentifier in plist file?
Asked Answered
O

2

24

In my Xcode project's plist file, I can see the value for the key CFBundleIdentifier is:

com.mycompany.${PRODUCT_NAME:rfc1034identifier}

Obviously I will have to change com.mycompany to the domain name of my company, but I have no idea whether the rfc1034identifier should be removed so that it becomes:

com.mycompany.${PRODUCT_NAME}

Google did not help answering my question. Does this rfc1034identifier affect the AppID that I should provide in the iPhone Developer program - Provisioning Portal?

Ordovician answered 18/3, 2010 at 7:39 Comment(1)
Also see hereSkip
T
36

The :rfc1034identifier just formats it (if needed) so there are no illegal characters* in the bundle name. You're unlikely to have a product that is called by an illegal character but it's not impossible.

I'd leave it in there but it's really up to you.

(Actually, most of the time I just hardcode the bundle - that way if the product name changes for any reason, it's still got the same bundle identifier when I come to update it in the app store)

*such as a space or a dot - they will be replaced with a dash so 'My Game' would become 'My-Game'

Triumphant answered 18/3, 2010 at 8:37 Comment(1)
can we use numerics in the bundle id such as com.mycompany.appname100 ?Disconcert
A
1

My understanding (though trial and error) is that the identifier must be unique for each app that you submit, or load onto an iOS device via iTunes or directly. So even if your used a '*' as the identifier (1), each app must have it's own unique identifier. So, unless you change the PRODUCT_NAME from app to app, you want to append something after ${PRODUCT_NAME:rfc1034identifier}, to make sure it's unique. I add a date in YYMMDD format to do this : ${PRODUCT_NAME:rfc1034identifier}110524 (for May 24, 2011)

(1) ie: in the provisioning portal, when you create a a new app id, you put a '*' in the 'Bundle Identifier (App ID Suffix)" field

Aponte answered 25/5, 2011 at 0:30 Comment(1)
Why would you not change the PRODUCT_NAME from app to app?Shattuck

© 2022 - 2024 — McMap. All rights reserved.