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

iOS export generates broken xcode project if Short Version is left blank (doesn't fall back to project version) #83684

Closed
lostminds opened this issue Oct 20, 2023 · 2 comments · Fixed by #83686

Comments

@lostminds
Copy link

Godot version

4.2beta2

System information

Godot v4.2.beta2 - macOS 13.6.0 - Vulkan (Mobile) - integrated Apple M2 Pro - Apple M2 Pro (10 Threads)

Issue description

In export presets for macOS and iOS we have two version parameters "Short Version" and "Version". The "Short version" is what is shown to the user (just called "Version" in XCode) and "Version" is what xcode/macOS refers to as the "Build" number (this needs to be unique when submitting to apple app store for example). (So for clarity, perhaps these fields could be renamed in the export panel to Version and Build?)

For both fields the tooltips now say that they will be automatically populated with the new project setting version:
Screenshot 2023-10-20 at 17 43 19

However, this doesn't seem to work. And for iOS export at least leaving it blank generates an xcode project export with

MARKETING_VERSION = ;
CURRENT_PROJECT_VERSION = 1.1.5;

Set for the build targets. (MARKETING_VERSION is the internal name for Version, and CURRENT_PROJECT_VERSION for Build, to make things even harder to follow)

And trying to open this xcode project just gives you an error:

The project <project> is damaged and cannot be opened due to a parse error. Examine the project file for invalid edits or unresolved source control conflicts.

So to sum it up:

  • Leaving the Short Version field empty doesn't fall back to the project settings version as stated. Resulting instead in an empty version field in the generated xcode project.pbxproj file that means the project can't be opened in xcode.

Smaller issues:

  • Once this is fixed, perhaps the default for both macOS and iOS export targets Short Version should be empty just like Version so it used the project Settings version.
  • While the tooltips for both properties say they will fall back to the project setting version if left empty, only the Version field has a placeholder text saying this when it's empty.
  • As noted above, maybe consider changing at least the display name of "Short version" to "Version" and "Version" to "Build" to better reflect the apple/xcode names for these properties.
  • As leaving the version fields empty in the generated project.pbxproj apparently makes it impossible to open, perhaps an extra safeguard should be added to always write something (like "0") if no version is set for whatever reason.

Steps to reproduce

Export an iOS project with the Short Version field empty

Minimal reproduction project

Any iOS export

@akien-mga
Copy link
Member

CC @Calinou @bruvzg

@bruvzg
Copy link
Member

bruvzg commented Oct 20, 2023

Fallback seems to be implemented only version (using get_version method), on both iOS and macOS.

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

Successfully merging a pull request may close this issue.

3 participants