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

[macOS/iOS export] Add option to set custom Info.plist data. #87029

Merged
merged 1 commit into from
Jan 11, 2024

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Jan 10, 2024

@akien-mga
Copy link
Member

It should probably mention what format is expected (maybe simply linking to the relevant Apple docs).

@bruvzg
Copy link
Member Author

bruvzg commented Jan 10, 2024

Added link to the Apple docs, and example.

@akien-mga akien-mga modified the milestones: 4.x, 4.3 Jan 10, 2024
@akien-mga
Copy link
Member

akien-mga commented Jan 10, 2024

How does it behave on export if the user puts invalid data / syntax errors? Do we export gracefully and then the .app would fail running? Is the error then clear enough?

Edit: If we want to do some validation on our side, we could likely check that XMLParser is happy with the syntax at least. Probably not worth implementing support for validating everything Apple would do itself though.

@bruvzg
Copy link
Member Author

bruvzg commented Jan 10, 2024

How does it behave on export if the user puts invalid data / syntax errors? Do we export gracefully and then the .app would fail running?

If it's completely invalid data, the app will run, but won't show info or have an icon. If it's valid fomatting but unknown keys/values, it will be ignored.

@bruvzg
Copy link
Member Author

bruvzg commented Jan 10, 2024

we could likely check that XMLParser is happy with the syntax at least.

It won't be enough, valid XML data is not necessarily valid part of <dict> element. Proper validation should check if it's matching http://www.apple.com/DTDs/PropertyList-1.0.dtd schema, but I do not think we have any code for this, and it probably is not worth adding for such minor feature.

@lostminds
Copy link

It won't be enough

You're right that it won't be enough to ensure it's a valid addition. But hopefully checking that it's valid xml should at least ensure the additions are correctly closed tags so the addition doesn't risk messing up the parsing of the entire Info.plist. If we can be reasonably sure about that it's a lesser problem if the content in the addition is just ignored if it's formatted incorrectly.

@akien-mga
Copy link
Member

Yeah if it doesn't add significant complexity to the code, I think just validating that the syntax is valid XML would be enough.

@bruvzg
Copy link
Member Author

bruvzg commented Jan 11, 2024

We actually have a dedicated PList parser for ad-hoc code signing (which can give more verbose error output than XMLParser), so I guess it probably better to use it.

@bruvzg
Copy link
Member Author

bruvzg commented Jan 11, 2024

Added validation using PList parser from ad-hoc code signer, most likely it won't catch every error, since it's not designed to for validation, but should reject completely invalid data.

@akien-mga akien-mga merged commit 26b1fd0 into godotengine:master Jan 11, 2024
15 checks passed
@akien-mga
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

Add custom Info.plist key additions field to iOS and macOS export settings
3 participants