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

AppIcons and Splash Screens Do Not Render Correctly on Physical Devices #9029

Closed
speschka opened this issue Jul 27, 2022 · 4 comments
Closed
Labels
area-single-project Splash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizer platform/android 🤖 platform/iOS 🍎 t/bug Something isn't working

Comments

@speschka
Copy link

Description

My app has our own image for splash screen and app icon. Depending on whether you are using iOS or Android, and a physical device or emulator, you will see different results. Specifically here's what we are seeing:

  • iPhone Emulator (iOS 15.5) and iPad Emulator (iOS 15.5) - both the app icon and splash screen are displayed correctly.
  • Android Emulator (API 30) - the splash screen is displayed correctly. Our app icon is used, but it is not scaled correctly so you cannot see what it actually looks like, as you can on the iPhone emulator.
  • iPhone Physical Device (iOS 15.5) - neither the app icon nor splash screen are displayed correctly. Instead it uses the default ".NET" with white lettering on a blue background default values.
  • Android Physical Device (API 30 and second device that is API 31) - the app icon appears incorrectly, the same way as it does on the Android emulator. The splash screen does not display at all. It shows a blank white screen but our custom splash screen image is not displayed.

We are at the publishing point and now effectively blocked from releasing them. This is bad.

Steps to Reproduce

I duplicated this same behavior in a brand new .NET MAUI project. I did the following:

  1. Create a new .NET MAUI app.

  2. Delete the appicon.svg and appiconfg.svg files.

  3. Delete the splash.svg file.

  4. Add a new icon file called appicon.png to the Resources\AppIcon folder.

  5. Set the Build Action for the new icon file to MauiIcon.

  6. Add a new splash screen file called wlsplash.png to the Resources\Splash folder.
    SplashScreenFailure.xlsx

  7. Set the Build Action for the new splash screen file to MauiSplashScreen.

  8. Edit the project's .csproj file to add scale attribute for the MauiIcon; it now reads like this:
    MauiSplashAndIconTest.zip

  9. Edit the project's .csproj file to add scale and background color for the MauiSplashScreen; it now reads like this:

  10. Build and deploy to emulators and physical devices.

What I Expect to Happen: my icon and splash screen images will be displayed, correctly scaled, on all emulators and physical devices.

What Actually Happens: everything I described in the bug report Description above. I've attached screenshots of everything I've described above.
iPhone_AppIcon
iPhone_Emulator_AppIcon
iPhone_Splash
Android_Emulator_AppIcon

Version with bug

6.0.400

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android

Affected platform versions

iOS 15.5, Android API 30, Android API 31

Did you find any workaround?

I have not found any other workaround at this time. And that's after REALLY trying. :-)

Relevant log output

This is from the Device Log on the first physical Android device I tried this on, where I was actually able to find entries about the splash screen:

Time	Device Name	Type	PID	Tag	Message
15:15.2	Samsung SM-G998U	Debug	3987	ShellTaskOrganizer	addStartingWindow: info=StartingWindowInfo{taskId=13 targetActivityInfo=null displayId=0 topActivityType=1 preferredStartingWindowType=2b insetsState=null topWindowLayoutParams=null mainWindowLayoutParams=null splashScreenThemeResId 7f10012c
15:19.4	Samsung SM-G998U	Info	1290	Layer	id=369 Destroyed Splash Screen com.watchlikes.watchlikesapp$_3987#0
15:19.4	Samsung SM-G998U	Info	1290	Layer	id=368 Destroyed 324b31e Splash Screen com.watchlikes.watchlikesapp#0
15:19.4	Samsung SM-G998U	Info	1290	Layer	id=380 Destroyed Surface(name=324b31e Splash Screen com.watchlikes.watchlikesapp)/@0xabd9f29 - animation-leash of window_animation#0
15:19.4	Samsung SM-G998U	Info	1290	SurfaceFlinger	id=380 Removed Surface(name=324b31e Splash Screen com.watchlikes.watchlikesapp)/@0xabd9f29 - animation-leash of window_animation#0 (107)
15:19.4	Samsung SM-G998U	Info	1290	SurfaceFlinger	id=369 Removed Splash Screen com.watchlikes.watchlikesapp$_3987#0 (107)
15:19.4	Samsung SM-G998U	Info	1290	SurfaceFlinger	id=368 Removed 324b31e Splash Screen com.watchlikes.watchlikesapp#0 (107)
15:19.4	Samsung SM-G998U	Info	1290	Layer	id=380 removedFromDrawingState Surface(name=324b31e Splash Screen com.watchlikes.watchlikesapp)/@0xabd9f29 - animation-leash of window_animation#0 (107)
15:19.4	Samsung SM-G998U	Info	1290	Layer	id=368 removedFromDrawingState 324b31e Splash Screen com.watchlikes.watchlikesapp#0 (107)
15:19.4	Samsung SM-G998U	Info	1290	Layer	id=369 removedFromDrawingState Splash Screen com.watchlikes.watchlikesapp$_3987#0 (107)
15:19.4	Samsung SM-G998U	Info	1368	WindowManager	Destroying surface Surface(name=Splash Screen com.watchlikes.watchlikesapp$_3987)/@0xd660bba called by com.android.server.wm.WindowStateAnimator.destroySurface:987 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:518 com.android.server.wm.WindowState.destroySurfaceUnchecked:4236 com.android.server.wm.WindowState.destroySurface:4210 com.android.server.wm.ActivityRecord.destroySurfaces:5860 com.android.server.wm.ActivityRecord.destroySurfaces:5841 com.android.server.wm.WindowState.onExitAnimationDone:5979 com.android.server.wm.WindowStateAnimator.onAnimationFinished:242 
15:19.4	Samsung SM-G998U	Error	1368	WindowManager	win=Window{324b31e u0 Splash Screen com.watchlikes.watchlikesapp EXITING} destroySurfaces: appStopped=false win.mWindowRemovalAllowed=true win.mRemoveOnExit=true win.mViewVisibility=8 caller=com.android.server.wm.ActivityRecord.destroySurfaces:5860 com.android.server.wm.ActivityRecord.destroySurfaces:5841 com.android.server.wm.WindowState.onExitAnimationDone:5979 com.android.server.wm.WindowStateAnimator.onAnimationFinished:242 com.android.server.wm.WindowState.onAnimationFinished:6232 com.android.server.wm.WindowContainer$$ExternalSyntheticLambda0.onAnimationFinished:2 com.android.server.wm.SurfaceAnimator.lambda$getFinishedCallback$0$SurfaceAnimator:113 
15:19.4	Samsung SM-G998U	Info	1368	WindowManager	Reparenting to original parent: Surface(name=ActivityRecord{59e365d u0 com.watchlikes.watchlikesapp/crc644b9001ccefd6c778.MainActivity t13})/@0xfaf7003, destroy=true, surface=Surface(name=324b31e Splash Screen com.watchlikes.watchlikesapp)/@0xabd9f29
15:19.4	Samsung SM-G998U	Warning	1368	InputManager-JNI	Input channel object '324b31e Splash Screen com.watchlikes.watchlikesapp (client)' was disposed without first being removed with the input manager!
15:19.3	Samsung SM-G998U	Debug	1368	WindowManager	makeSurface duration=1 leash=Surface(name=Surface(name=324b31e Splash Screen com.watchlikes.watchlikesapp)/@0xabd9f29 - animation-leash of window_animation)/@0xbf172ae
15:19.3	Samsung SM-G998U	Info	1290	SurfaceFlinger	id=380 createSurf (0x0),-1 flag=24000, Surface(name=324b31e Splash Screen com.watchlikes.watchlikesapp)/@0xabd9f29 - animation-leash of window_animation#0
15:19.3	Samsung SM-G998U	Info	1368	WindowManager	Reparenting to leash, surface=Surface(name=324b31e Splash Screen com.watchlikes.watchlikesapp)/@0xabd9f29, leashParent=Surface(name=ActivityRecord{59e365d u0 com.watchlikes.watchlikesapp/crc644b9001ccefd6c778.MainActivity t13})/@0xfaf7003
15:19.3	Samsung SM-G998U	Verbose	1368	WindowManager	Relayout Window{324b31e u0 Splash Screen com.watchlikes.watchlikesapp}: viewVisibility=8 req=1080x2400 d0
15:15.3	Samsung SM-G998U	Debug	3987	InsetsSourceConsumer	ensureControlAlpha: for ITYPE_STATUS_BAR on Splash Screen com.watchlikes.watchlikesapp
15:15.3	Samsung SM-G998U	Debug	3987	InsetsSourceConsumer	ensureControlAlpha: for ITYPE_NAVIGATION_BAR on Splash Screen com.watchlikes.watchlikesapp
15:15.3	Samsung SM-G998U	Debug	1368	WindowManager	finishDrawingWindow: Window{324b31e u0 Splash Screen com.watchlikes.watchlikesapp} mDrawState=DRAW_PENDING
15:15.2	Samsung SM-G998U	Debug	1368	WindowManager	makeSurface duration=1 name=Splash Screen com.watchlikes.watchlikesapp$_3987
15:15.2	Samsung SM-G998U	Info	1290	SurfaceFlinger	id=369 createSurf (1x1),-3 flag=40004, Splash Screen com.watchlikes.watchlikesapp$_3987#0
15:15.2	Samsung SM-G998U	Verbose	1368	WindowManager	Relayout Window{324b31e u0 Splash Screen com.watchlikes.watchlikesapp}: viewVisibility=0 req=1080x2400 d0
15:15.2	Samsung SM-G998U	Info	1290	SurfaceFlinger	id=368 createSurf (0x0),-1 flag=80004, 324b31e Splash Screen com.watchlikes.watchlikesapp#0
15:15.2	Samsung SM-G998U	Debug	3987	StartingSurfaceDrawer	addSplashScreen com.watchlikes.watchlikesapp theme=7f10012c task=13 suggestType=3
@speschka speschka added s/needs-verification Indicates that this issue needs initial verification before further triage will happen t/bug Something isn't working labels Jul 27, 2022
@speschka
Copy link
Author

The images in the Steps to Reproduce probably need a little explanation.

  • The first image is the AppIcon that shows up on a physical iPhone device (again, renders correctly on the iPhone and Android emulators).
  • The second image is the correct AppIcon, the way it should be displayed, as seen on an iPhone emulator device.
  • The third image is the splash screen that shows up on a physical iPhone device (again, renders correctly on the iPhone and Android emulators).
  • The fourth image is the AppIcon as it appears on both the Android emulator and physical device. You can see it is largely cropped out instead of being scaled correctly, as shown in the AppIcon on the iPhone emulator (i.e. the second image).

@hartez hartez added the area-single-project Splash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizer label Jul 27, 2022
@jfversluis jfversluis removed the s/needs-verification Indicates that this issue needs initial verification before further triage will happen label Aug 1, 2022
@jfversluis jfversluis added this to the .NET 7 Planning milestone Aug 1, 2022
@speschka
Copy link
Author

speschka commented Aug 3, 2022

Could someone explain what it means that it's been added to the .NET 7 Planning milestone? Does that mean it will not be fixed until .NET 7? Because that would mean that we cannot ship any product until .NET 7 ships. Or ship it with icons that say .NET and look like complete laughingstocks. Neither of those two options are really a credible choice.

@Cywizz
Copy link

Cywizz commented Aug 17, 2022

Waiting for .Net 7 is also an issue for me.
If this cannot be avoided, is there at least some sort of workaround that we could use until then?
Below is the splash screen example, first image running fine on android emulator, second running not scaled/cropped on physical device:

image

Screenshot_20220817-064210

Would appreciate any feedback or pointers from the team.

@mattleibow
Copy link
Member

The issue with no images is duplicated from here #7404 and was fixed in this PR #8394

The issue with broken images is fixed here: #9509

The issue with the clipped round image is part of the new screenshot APIs Google has added. This is tracked here: #9794 and also includes a very nice and simple workaround until the fix goes public.

@mattleibow mattleibow closed this as not planned Won't fix, can't repro, duplicate, stale Aug 31, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Sep 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-single-project Splash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizer platform/android 🤖 platform/iOS 🍎 t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants