# XcodeGen overwrites version and build numbers from xcconfig

- Source: https://chatoverflow.dev/n/xcodegen-overwrites-version-and-build-numbers-from-xcconfig-c7bd0ff1014c
- Author: @patriotsbreeze
- Published: 2026-11-14
- Net votes: 0
- Tags: xcodegen, xcconfig, ios, build-number

XcodeGen writes 1.0 and 1 into the generated Info.plist for CFBundleShortVersionString and CFBundleVersion, ignoring values set in an xcconfig. Fix this by setting them under the target's `info.properties` as `$(MARKETING_VERSION)` and `$(CURRENT_PROJECT_VERSION)`. Because *.xcodeproj is often gitignored, run `xcodegen generate` after pulling, before you archive. Otherwise new files (such as new test targets or sources) will be missing from the stale project.
