In my iOS apps, i have a script (a build phase actually) that upgrades the target's Info.plist CFBundleVersion to a number related to the git commit count. I've been using for a while and it works for me, never a problem.
On Xcode 14, something has changed and the script keeps working (i mean the .plist file is correctly updated) but applications no longer shows the correct build number and it's missing on Archive too. I'll add some screenshot (of a blank new project, so no settings have been altered in times).
This is Target's General Tab in Xcode 14 
This is Target's Info Tab
This is Info.plist file correctly updated by Build Phase Script
In previous Xcode versions, on Target's General Tab i used to have the build number synced with the one in .plist file and it was also synced when Archiving builds.
Now, if i try to archive the build, it goes out as 1.0(1).
Am I missing something or am I doing something wrong?
Hope you can understand my English. Thanks for your help.
I use xcconfig for set version and build in Xcode. In Base.xcconfig set
MARKETING_VERSION = 22.47.0
CURRENT_PROJECT_VERSION = 221125.1437
Pay attention if you using CocoaPods you should create Release and Debug xcconfig with content Debug.xcconfig
#include "../Pods/Target Support Files/Pods-{SET_PROJECT_HERE}/Pods-{SET_PROJECT_HERE}.debug.xcconfig"
#include "Base.xcconfig"
Release.xcconfig
#include "../Pods/Target Support Files/Pods-{SET_PROJECT_HERE}/Pods-{SET_PROJECT_HERE}.release.xcconfig"
#include "Base.xcconfig"
Set values in info.plist
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
Hope its help
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