Closed vSmeshkov closed 2 years ago
Hi @vSmeshkov!
That's true. As of Xcode 11.2.1, the value in the .xcodeproj
file is incorrectly deposited into the Info.plist
file as a string, $(MARKETING_VERSION)
, the version code can be retrieved directly from the xcodeproj file using the following script:
#!/bin/bash
projectFilePath=$BITRISE_SOURCE_DIR/PROJECT_NAME/PROJECT_NAME.xcodeproj/project.pbxproj
version_number=`sed -n '/MARKETING_VERSION/{s/MARKETING_VERSION = //;s/;//;s/^[[:space:]]*//;p;q;}' $projectFilePath`
envman add --key MARKETING_VERSION_REVISED --value $version_number
From this point on the $MARKETING_VERSION
value that should have been in the application plist should now be referenced via $MARKETING_VERSION_REVISED.
Hi @vSmeshkov!
That's true. As of Xcode 11.2.1, the value in the
.xcodeproj
file is incorrectly deposited into theInfo.plist
file as a string,$(MARKETING_VERSION)
, the version code can be retrieved directly from the xcodeproj file using the following script:#!/bin/bash projectFilePath=$BITRISE_SOURCE_DIR/PROJECT_NAME/PROJECT_NAME.xcodeproj/project.pbxproj version_number=`sed -n '/MARKETING_VERSION/{s/MARKETING_VERSION = //;s/;//;s/^[[:space:]]*//;p;q;}' $projectFilePath` envman add --key MARKETING_VERSION_REVISED --value $version_number
From this point on the
$MARKETING_VERSION
value that should have been in the application plist should now be referenced via$MARKETING_VERSION_REVISED.
Hi, thank you for your response!
This bitrise step about how to set new version and it looks like update .pbxproj
file is best practice now. Current version of this step just update Info.plist file, and updated value can be overridden by Xcode.
Hello there, I'm a bot. On behalf of the community I thank you for opening this issue.
To help our human contributors focus on the most relevant reports, I check up on old issues to see if they're still relevant. This issue has had no activity for 90 days, so I marked it as stale.
The community would appreciate if you could check if the issue still persists. If it isn't, please close it. If the issue persists, and you'd like to remove the stale label, you simply need to leave a comment. Your comment can be as simple as "still important to me".
If no comment left within 21 days, this issue will be closed.
I'll close this issue as it doesn't seem to be relevant anymore. We believe an old issue probably has a bunch of context that's no longer relevant, therefore, if the problem still persists, please open a new issue.
Since Xcode 11 apple proposes to use MARKETING_VERSION and CURRENT_PROJECT_VERSION in build settings except info.plist values.