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

Setting build number (CFBundleVersion) as integer, xcode expecting a string #159

Closed
robations opened this issue Oct 8, 2021 · 7 comments · Fixed by #183
Closed

Setting build number (CFBundleVersion) as integer, xcode expecting a string #159

robations opened this issue Oct 8, 2021 · 7 comments · Fixed by #183
Labels

Comments

@robations
Copy link

Setting the version like this:

npx capacitor-set-version -v 1.2.3 -b 1234 ./

sets the CFBundleVersion to an <integer>1234</integer>, but XCode complains until you change this back to a <string>1234</string>.

Is this expected or a bug?

I'd guess something is parsing the build number as a JS number and the plist library is applying the property value based on type.

@chrisspiegl
Copy link

I found this as well and consider it a bug. This broke my app build and crashed the app upon launch.

The worst part was that Xcode didn't quite catch it and thus it took me hours to figure out that it even was related to this issue.

I hope we can get this fixed because I consider the idea of syncing the version number with this plugin to be a great idea.

@chrisspiegl
Copy link

I just tried to figure out the code and I think I could propose a pull request, but wonder if it @HausennTechnologies would consider it since this issue has not gotten any attention?

Mostly it seems the input values have to be adjusted or the setIOSBuild function needs to parse the value into a string before writing it.

export function setIOSBuild(options: { dir: string; build: number }): void {

@daviesdoclc
Copy link

Would love to see this fixed as well.

@DKrepsky
Copy link
Contributor

Hello guys.
Sorry for the late response on this one.

@chrisspiegl that is right, just casting it to string is enough.

Also, any PR are welcome.

For this one, I'll fix it today.

Thanks

DKrepsky added a commit that referenced this issue Dec 15, 2021
DKrepsky added a commit that referenced this issue Dec 15, 2021
github-actions bot pushed a commit that referenced this issue Dec 15, 2021
## [1.3.32](v1.3.31...v1.3.32) (2021-12-15)

### Bug Fixes

* ios build number as string ([bb74e22](bb74e22)), closes [#159](#159)
@github-actions
Copy link

🎉 This issue has been resolved in version 1.3.32 🎉

The release is available on:

Your semantic-release bot 📦🚀

@DKrepsky
Copy link
Contributor

This should be fixed now.
If the bug persists, please open a new issue.

@chrisspiegl
Copy link

Tested, seems to be working.

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

Successfully merging a pull request may close this issue.

4 participants