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

Improve the control over resource generation #16845

Merged
merged 6 commits into from
Aug 22, 2023
Merged

Improve the control over resource generation #16845

merged 6 commits into from
Aug 22, 2023

Conversation

mattleibow
Copy link
Member

@mattleibow mattleibow commented Aug 18, 2023

Description of Change

Previously, there was an issue where if you deleted the <MauiSplashScreen> item and did NOT have a custom splash screen, then the iOS app would render incorrectly:

This is not great behavior, so we went and added a way to automatically generate a splash screen for you if we detected that you did not have one:

This made things amazing again, except if you want to have a custom splash screen from a storyboard:

As a result, this PR is partially "reverting" the change because having no way to override the splash screen is worse than having a weird looking app that you will need to fix anyway for the App Store.

This PR has a few things actually:

  • Some additional property to control various generation features that can be used to wholesale disable certain items in case of either a terrible bug or a custom processing pipeline:
    • <EnableMauiAssetProcessing> can stop the packaging of any <MauiAsset> items
    • <EnableMauiSplashScreenProcessing> can stop the packaging of any <MauiSplashScreen> items
    • <EnableMauiFontProcessing> can stop the packaging of any <MauiFont> items
    • <EnableMauiImageProcessing> can stop the packaging of any <MauiImage> items
  • Opt-in for the generation of a blank splash screen - if you do not have a ` item AND for some reason you do not have a custom splash:
    • <EnableBlankMauiSplashScreen> will generate a blank splash screen if no <MauiSplashScreen> items were found. This will override any custom splash screens and may/probably will cause an App Store rejection. But, it is useful in testing to ensure the app UI is correct.

Issues Fixed

Fixes #16843

@mattleibow mattleibow requested a review from a team as a code owner August 18, 2023 00:32
@samhouts samhouts added this to the .NET 8 GA milestone Aug 18, 2023
Copy link
Member

@jonathanpeppers jonathanpeppers left a comment

Choose a reason for hiding this comment

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

The logic looks ok, I mainly had questions about naming.

@@ -568,6 +574,7 @@
</Target>

<Target Name="ResizetizeImages"
Condition="'$(EnableMauiImageProcessing)' != 'false'"
Copy link
Member

Choose a reason for hiding this comment

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

The only other thought, is we generally document every MSBuild property that is public, such as this doc that is synced with MS docs:

https://github.com/xamarin/xamarin-android/blob/main/Documentation/guides/building-apps/build-process.md

Should we prefix all these values with _ to make them private, but useable? Or is there a decent place to document them? Like:

https://github.com/dotnet/maui/blob/main/src/Workload/README.md

Copy link
Member Author

Choose a reason for hiding this comment

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

I think I want public, but not sure I am ready to commit.

@mattleibow
Copy link
Member Author

/rebase

@samhouts
Copy link
Member

Related: #14421

@mattleibow
Copy link
Member Author

Some black splash screens are a result of xamarin/xamarin-macios#18777

@hartez hartez merged commit ed2c958 into main Aug 22, 2023
34 checks passed
@hartez hartez deleted the dev/maui-splash branch August 22, 2023 16:47
@github-actions github-actions bot locked and limited conversation to collaborators Dec 5, 2023
@samhouts samhouts added the fixed-in-8.0.0-rc.1.9171 Look for this fix in 8.0.0-rc.1.9171 label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
fixed-in-8.0.0-rc.1.9171 Look for this fix in 8.0.0-rc.1.9171
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[regression/8.0.0-preview.1.7762] Unable to use a custom splash screen
4 participants