Skip to content

Update Dotnet iOS Export Process #100187

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

Merged
merged 1 commit into from
Jul 3, 2025

Conversation

atlasapplications
Copy link
Contributor

@atlasapplications atlasapplications commented Dec 9, 2024

Resolves #100123

This updates the iOS export build process to allow for hybrid globalization introduced in .NET 9 while preserving .NET 8 settings. Also allows for custom ICU or no ICU.

UPDATE:

After reading more about how future versions of .NET will handle globalization APIs it's unnecessary to support hybrid globalization so this updates the iOS export build process to check if the ICU file is needed (such as with .NET 8) and if not (such as with .NET 9+) the ICU file is simply omitted.

@raulsntos
Copy link
Member

I noticed this PR is still a draft. Are there any other changes you want to make?

@atlasapplications
Copy link
Contributor Author

Thank you for reminding me. I hadn't gotten around to testing this yet. I tested it today and there are a few issues.

My understanding was slightly off with how globalization features are being used in future versions of .NET, which I think I understand more now based off this documentation. Switching from a .NET 8 and 9 branch shows the differences.

It seems that .NET 8 by default uses full ICU data (icudt.dat) but can be changed to a hybrid mode which would produce a slimmed down icudt_hybrid.dat file. The copy functionality seemed to have been written when this default behavior produced that file. Unfortunately, by .NET 9, this functionality changed as no ICU data is generated at all on iOS (including tvOS and maccatalyst) because it's no longer needed as native APIs are used instead.

So, basically the build system just never supported hybrid globalization and now it's not necessary for iOS with .NET 9+ since native APIs are used.

So for this PR, should I change the scope to basically just check if it's .NET 8 (as that is now the minimum as of Godot 4.4), look for either icudt.dat or icudt_hyrbid.dat, which would be adding support for hybrid globalization? Then, for .NET 9+, just skip the copy entirely? Also would adding the potential for a custom ICU file seem important at all?

@raulsntos
Copy link
Member

If hybrid globalization is going away in .NET 9 and we never supported it, I wouldn't add support now. We'll move to .NET 10 eventually so there's no need to add support for something that we'll be removing soon after.

I'm not sure what's the use case for custom ICU files, it doesn't seem there is a big demand for that so I would not add support for it either.

Update iOS export to allow for hybrid globalization introduced in .NET 9 while preserving .NET 8 settings. Also allows for custom ICU or no ICU.
@atlasapplications
Copy link
Contributor Author

Sounds good. I revised the code to reflect what we discussed so it's ready for review now.

@atlasapplications atlasapplications marked this pull request as ready for review July 1, 2025 18:44
@atlasapplications atlasapplications requested a review from a team as a code owner July 1, 2025 18:44
Copy link
Member

@raulsntos raulsntos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes in this PR look good to me. But I don't have an iOS device so I can't test that it works as expected.

@Repiteo Repiteo modified the milestones: 4.x, 4.5 Jul 3, 2025
@Repiteo Repiteo merged commit fc20bb6 into godotengine:master Jul 3, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Jul 3, 2025

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.

Export Error with .NET 9 on iOS
4 participants