An XCode 3.X application running on 10.6.8 has this entry in info.plist:
<key>CFBundleVersion</key>
<string>2035</string>
In awakeFromNib() a quick check is made:
CFBundleRef br = CFBundleGetMainBundle();
if (br)
{
uint32_t v32 = CFBundleGetVersionNumber(br);
}
The reference is non-zero but the version number is always 0.
Get Info in Finder displays the expected number.
Any ideas why? Many thanks.
See the documentation for CFBundleGetVersionNumber:
You’re not using the old OS 9-style
'vers'version resources in a .rsrc file, you’re using the modern method of specifying it as a string in anInfo.plistfile.You could use something like: