Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7427911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T08:39:36+00:00 2026-05-29T08:39:36+00:00

An XCode 3.X application running on 10.6.8 has this entry in info.plist: <key>CFBundleVersion</key> <string>2035</string>

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T08:39:37+00:00Added an answer on May 29, 2026 at 8:39 am

    See the documentation for CFBundleGetVersionNumber:

    Return Value

    A Mac OS 'vers' resource style version number. If the bundle’s version number is a number, it is interpreted as the unsigned long integer format defined by the 'vers' resource on Mac OS 9. If it is a string, it is automatically converted to the numeric representation, where the major version number is restricted to 2 BCD digits (in other words, it must be in the range 0-99) and the minor and bug fix version numbers are each restricted to a single BCD digit (0-9). See Technical Note TN1132 for more details.

    Discussion

    This function is only supported for the Mac OS 'vers' resource style version numbers. Where other version number styles—namely X, or X.Y, or X.Y.Z—are used, you can use CFBundleGetValueForInfoDictionaryKey with the key kCFBundleVersionKey to extract the version number as a string from the bundle’s information dictionary.

    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 an Info.plist file.

    You could use something like:

    NSInteger bundleVersion = CFStringGetIntValue(
           CFBundleGetValueForInfoDictionaryKey(br, kCFBundleVersionKey));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

From times to times, while debugging an Application, I see this error on Xcode:
I have an application that has been running fine since its launch over a
I have a 3.1 xcode project that has been running my app just fine
I am trying to create an mac application in XCode that has some of
I newly installed xcode 4.0.2 from the application cd running on snow leopard 10.6.8
I've got a WebView in a Max OSX Cocoa Application in Xcode. This WebView
I am running my application through xcode's static analyzer and it pointed out that
I've created a new View-based Application in XCode. In the ViewController, the only code
How can I self-sign an iPhone application using Xcode? I have done the following:
I have snow leopard and I'm building a cpp Application with xcode. I would

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.