When I do:
agvtool new-version -all 99
It updates my Info.plist file. However, if I do this:
agvtool what-version
or
agvtool next-version
I get this error:
There does not seem to be a CURRENT_PROJECT_VERSION key set for this project.
Add this key to your target's expert build settings.
Why does this not correspond. Do I have to use the plist command line tool in order to retrieve the current version of my app. Curiously agvtool what-marketing-version
works fine. Ironically agvtool does not seem to have a version itself ;-)
agvtool is a command-line tool that allows you to automatically increment these numbers to the next highest number or to a specific number. This document provides step-by-step instructions for updating your build and version numbers using agvtool .
Click the Xcode Cloud tab and choose Settings in the sidebar. Click the Build Number tab below Settings. Click the Edit button next to Next Build Number. Enter a new build number and save your changes.
Changing CURRENT_PROJECT_VERSION modifies values within your project's project. pbxproj file and if you are running a distributed team, this will cause merge conflicts if the other half of the team tries to update and while they were asleep, you updated this internal value.
CFBundleShortVersionString gives you the version of your app. It's typically incremented each time you publish your app to the App Store. This is the version that is visible on the "Version" section for the App Store page of your application.
This link worked for me Technical Q&A QA1827 Automating Version and Build Numbers Using agvtool
From the link is the following. This help resolve the issue when I started using the agvtool.
Navigate to the Build Settings pane of your target, then update it for all your build configurations.
Set Current Project Version to a value of your choosing. I set my to 1
Set Versioning System to Apple Generic.
By default, Xcode does not use any versioning system. Setting Versioning System to Apple Generic ensures that Xcode will include all agvtool-generated version information in your project.
agvtool searches your application’s Info.plist for your version and build numbers. It updates them if they exist and does nothing, otherwise. Make sure that the CFBundleVersion (Bundle version) and CFBundleShortVersionString (Bundle versions string, short) keys exist in your Info.plist
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With