Using Fastlane action get_build_number uses agvtool what-version --terse which fails because the key CURRENT_PROJECT_VERSION is not set for the project.
What is the best solution for this?
Hi @brandtdaniels. It looks like CURRENT_PROJECT_VERSION is only being set on framework targets. You could set in on the whole project if you wanted to like this
settings:
base:
CURRENT_PROJECT_VERSION: 1
Our build number and version is stored in our plist. I would need to get that number from the plist.
The way I imagined it would work was that when the project was generated, xcodegen would read the version and build numbers from the plist and set the appropriate values in the build settings.
@brandtdaniels Hey, I'm having the same problem.
Did you manage to solve the problem?
How?
Thanks
How is this solved in projects created in Xcode? The project that gets created also doesn't have CURRENT_PROJECT_VERSION on the project level
I solved this by not using fastlane to bump the build number, but to use an environment variable set by our build server.
properties:
CFBundleVersion: ${DS_BUILD_NUM}
CFBundleShortVersionString: 0.13.0
FYI: You can also use plistbuddy to do it.
Also see: https://github.com/toshi0383/xcconfig-extractor#agvtool-compatibility
Maybe missing part is
INFOPLIST_FILE: path-to-your.plist
Most helpful comment
Our build number and version is stored in our plist. I would need to get that number from the plist.
The way I imagined it would work was that when the project was generated, xcodegen would read the version and build numbers from the plist and set the appropriate values in the build settings.