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 6067131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:34:31+00:00 2026-05-23T09:34:31+00:00

Yes, this is very related to this question , yet I think that question

  • 0

Yes, this is very related to this question, yet I think that question is adequately answered for XCode 3. Not sure if this should be merged or not.

So – Using similar instructions from there, I’ve long had the nice effect of having build numbers encoded into archived .ipa files, such that Organizer shows versions like “1.0.3281” (where 3281 is the revision via the below build script attached to my iOS target):

REV=`svnversion -nc | /usr/bin/sed -e 's/^[^:]*://;s/[A-Za-z]//'`
echo "REV=$REV"
echo "#define kRevisionNumber @\"$REV\"" > ${PROJECT_DIR}/revision.h
echo "INFOPLIST_PATH=${INFOPLIST_PATH}"

BASEVERNUM=`/usr/libexec/PlistBuddy -c "Print :CFBundleVersion" "${INFOPLIST_FILE}" | sed 's/,/, /g'`
echo "BASEVERNUM=$BASEVERNUM"
PLISTARG1="Set :CFBundleVersion $BASEVERNUM.$REV"
echo "PLISTARG1=$PLISTARG1"

/usr/libexec/PlistBuddy -c "$PLISTARG1" "${TARGET_BUILD_DIR}"/${INFOPLIST_PATH}

However, XCode 4 (which I’ve since come to love) clearly needs some tweaking, as this magic only sort-of works. Here is the result of the scripts above.

REV=3281
INFOPLIST_PATH=Foo.app/Info.plist
BASEVERNUM=1.0
PLISTARG1=Set :CFBundleVersion 1.0.3281

And I can see by looking in ~/Library/…/Foo.app/Info.plist that yes, it did update the right version:

<key>CFBundleVersion</key>
<string>1.0.3281</string>

So clearly there is an additional file needing updating.. perhaps in the .xcarchive? Any suggestions on where to drill into first?

  • 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-23T09:34:32+00:00Added an answer on May 23, 2026 at 9:34 am

    I’m not sure about the archive angle, but the following is working for me in Xcode 4 (i.e. my app is listed in organiser as Foo 1.0.307)

    1. Manually set the CFBundleShortVersionString (aka “Bundle versions string, short”) value in your info.plist to your major.minor build number (e.g. 1.0)

    2. Add a ‘run script’ build phase to your project with the following script

      REV=`svnversion -nc | /usr/bin/sed -e 's/^[^:]*://;s/[A-Za-z]//'`
      BASEVERNUM=`/usr/libexec/PlistBuddy -c "Print :CFBundleShortVersionString" "${INFOPLIST_FILE}"`
      /usr/libexec/PlistBuddy -c "Set :CFBundleVersion $BASEVERNUM.$REV" "${INFOPLIST_FILE}"
      
    3. Clean and build (the Clean step forces Xcode to reprocess the info.plist).

    BTW you can also access this version number inside your app (e.g. on your ‘about’ page) using [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sorry that this is very much a beginner's question, but yes, I'm only just
Yes, this is a programming-related question, if a little indirectly. For better or worse,
This is a very specific question that relates to a broader question asked here:
I understand that this may seems a very basic question, but I always thought
yes this is an iOS programming question. I need to calculate the exact time
This question falls into the yes - this works, yes - this is ugly,
I know the Sales pitch answer is yes to this question, but is it
Yes, I know this question has been asked before, but I can't find an
Yes, I know this question has been asked a lot of times, but I
If yes then presentational elements would be helpful in this condition so should we

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.