Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove quotes for CURRENT_PROJECT_VERSION value #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dvdchr
Copy link

@dvdchr dvdchr commented Oct 24, 2017

I am using this Gem along with Fastlane. In one of the steps within my production lanes, I use fastlane's bump_build_number. Before bumping the version number, I used pbxplorer to override code signing settings – however, somehow I get this error when bumping the build number:

Apple Generic Versioning is not enabled in this project.
Before being able to increment and read the version number from your Xcode project, you first need to setup your project properly. Please follow the guide at https://developer.apple.com/library/content/qa/qa1827/_index.html

After a lot of time digging around, fastlane 2.39.1 and above uses agvtool (i.e. Apple Generic Versioning Tool) to bump the build number. This led me to think that there's something fishy with agvtool after pbxproj rewrite, so I tried manually checking via agvtool what-version, and it fails.

Internally, agvtool looks for CURRENT_PROJECT_VERSION – but after the rewrite, it becomes "CURRENT_PROJECT_VERSION". The added double-quotes are what's causing the agvtool to fail. This PR fixes that by contextually checking and removing quotes from CURRENT_PROJECT_VERSION.

I have been using this workaround for a few months now, without issues. Tests are all passing. Let me know what you think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant