Deriving App ID from CFBundleName and CFBundleDisplayName




I found this documentation: How do the Mobile SDKs determine the App ID?

It states that for the App ID the value of CFBundleName within the application bundle is taken. If it is empty, CFBundleDisplayName is used.

So the CFBundleDisplayName is a fallback for CFBundleName.

I would like to know the motivation behind this behavior as Apple acts the other way around:

Apple says about CFBundleName: "This name can contain up to 15 characters. The system may display it to users if CFBundleDisplayName isn't set."

( CFBundleName - Information Property List | Apple Developer Documentation  )

For CFBundleDisplayName Apple also says: "Use this key if you want a product name that's longer than CFBundleName."

( CFBundleDisplayName - Information Property List | Apple Developer Documentation  )

So here the CFBundleName, which is limited in length, is a fallback for CFBundleDisplayName.

Moreover, following Table 1 "Summary of Core Foundation keys" in Core Foundation Keys, CFBundleDisplayName is required and CFBundleName only recommended, which raises the question, why CFBundleName is the first place to look for the App ID.

Should not the Mobile SDK derive the App ID primarily from CFBundleDisplayName and if it is empty, falling back to CFBundleName?

We have an app, whose name is longer than 15 characters. To be tracked correctly we would have to leave CFBundleName empty to let the SDK fall back to CFBundleDisplayName.


Accepted Solutions (1)

Accepted Solutions (1)




Hey vendig​,

I don't disagree with you, but it is something we couldn't change as it will break all the other customer's reports.

In my opinion, it'd better give CFBundleName a meaningful string and continue using it. And If you need to rename it, we'd suggest using classifications within the analytics ecosystem to turn the values into whatever you prefer.



Answers (0)