Marketing Version (CFBundleShortVersionString) is a user-visible string which should be three integers separated by periods, eg 1.4.16.
Current Project Version (CFBundleVersion aka Build Number) is machine-readable string. Can be three integers separated by periods, eg 1.4.16, but is more helpful as a single integer that is auto-incremented on each build.
XCode does not automagically increase the build number unless you set it up to so so. This page outlines one simple method to do so. (Spoiler - put xcrun agvtool next-version -all
in a Run Script build phase.)
in XCode, Product -> Archive builds a new archive that you can upload to Connect, but it doesn’t upload it automagically.
When you upload an archive to Connect, it will keep your build number and version number, provided they are unique across all versions / builds of that app.
But if you upload a second build /archive with the same Marketing Version (aka “version”) and also the same Project Version (aka “build number”) as a build that’s already in Connect, then Connect will ignore the build number on your new build and give you an incrementing integer as the build number for that archive.
So best to just get ahead of the game, and have your build number as a single integer, that auto-increments with each build (or each archive build).