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

Launch screen is not displayed in ios simulator xcode 15/iOS17/Sonoma #19430

Closed
last-Programmer opened this issue Nov 11, 2023 · 8 comments
Closed
Labels
need-attention An issue requires our attention/response
Milestone

Comments

@last-Programmer
Copy link

Steps to Reproduce

  1. Run the attached application in iOS 17 Simulator and you can see that launch screen is not showing.

Expected Behavior

Launch screen should be displayed at the start of the application

Actual Behavior

Black screen is shown at the launch

Environment

Version information
Visual Studio Enterprise 2022 for Mac
Version 17.6.6 (build 408)
Installation UUID: 565479ba-09bd-4125-ae3d-e5bbc07ab3e5

Runtime
.NET 7.0.3 (64-bit)
Architecture: X64
Microsoft.macOS.Sdk 13.1.1007; git-rev-head:8afca776a0a96613dfb7200e0917bb57f9ed5583; git-branch:release/7.0.1xx-xcode14.2

Roslyn (Language Service)
4.6.0-3.23180.6+99e956e42697a6dd886d1e12478ea2b27cceacfa

NuGet
Version: 6.4.0.117

.NET SDK (x64)
SDK: /usr/local/share/dotnet/sdk/7.0.310/Sdks
SDK Versions:
	7.0.310
	7.0.308
	7.0.304
	6.0.416
	6.0.414
	6.0.410
MSBuild SDKs: /Applications/Visual Studio.app/Contents/MonoBundle/MSBuild/Current/bin/Sdks

.NET Runtime (x64)
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
	7.0.13
	7.0.11
	7.0.7
	6.0.24
	6.0.22
	6.0.18

Xamarin.Profiler
Version: 1.8.0.49
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

Updater
Version: 11

Apple Developer Tools
Xcode: 15.0.1 22266
Build: 15A507

Xamarin.Mac
Version: 9.3.0.18 Visual Studio Enterprise
Hash: 9d266025e
Branch: xcode14.3
Build date: 2023-09-06 19:52:26-0400

Xamarin.iOS
Version: 16.4.0.18 Visual Studio Enterprise
Hash: 9d266025e
Branch: xcode14.3
Build date: 2023-09-06 19:52:27-0400

Xamarin Designer
Version: 17.6.3.9
Hash: 2648399ae8
Branch: remotes/origin/d17-6
Build date: 2023-10-23 17:40:07 UTC

Xamarin.Android
Version: 13.2.2.0 (Visual Studio Enterprise)
Commit: xamarin-android/d17-5/45b0e14
Android SDK: /Users/balu/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		13.0 (API level 33)

SDK Command-line Tools Version: 7.0
SDK Platform Tools Version: 34.0.1
SDK Build Tools Version: 32.0.0

Build Information: 
Mono: d9a6e87
Java.Interop: xamarin/java.interop/d17-5@149d70fe
SQLite: xamarin/sqlite/3.40.1@68c69d8
Xamarin.Android Tools: xamarin/xamarin-android-tools/d17-5@ca1552d

Microsoft Build of OpenJDK
Java SDK: /Library/Java/JavaVirtualMachines/microsoft-11.jdk
11.0.16.1
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

Eclipse Temurin JDK
Java SDK: /Library/Java/JavaVirtualMachines/temurin-8.jdk
1.8.0.302
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

Android SDK Manager
Version: 17.6.0.50
Hash: a715dca
Branch: HEAD
Build date: 2023-10-23 17:40:12 UTC

Android Device Manager
Version: 0.0.0.1309
Hash: 06e3e77
Branch: HEAD
Build date: 2023-10-23 17:40:12 UTC

Build Information
Release ID: 1706060408
Git revision: 3912eca6712af97335aa3a782abaa75ff86ec74a
Build date: 2023-10-23 17:38:20+00
Build branch: release-17.6
Build lane: release-17.6

Operating System
Mac OS X 14.1.1
Darwin 23.1.0 Darwin Kernel Version 23.1.0
    Mon Oct  9 21:27:27 PDT 2023
    root:xnu-10002.41.9~6/RELEASE_X86_64 x86_64

XCode 15.0.1

Example Project (If Possible)

AppWithLaunch.zip

@last-Programmer last-Programmer changed the title Launch screen is not displayed in ios simulator and device xcode 15/iOS17/Sonoma Launch screen is not displayed in ios simulator xcode 15/iOS17/Sonoma Nov 11, 2023
@rolfbjarne
Copy link
Member

I'm assuming this works on device since you changed the title; in which case this is likely a duplicate of #18469 - the problem is that the app needs to be signed for the iOS simulator to load the launch screen (this is apparently a new behavior in the iOS 16.4 simulator).

Can you try the workaround and see if it works for you?

<PropertyGroup Condition="$(RuntimeIdentifier.Contains('simulator'))">
    <EnableCodeSigning>true</EnableCodeSigning>
    <CodesignRequireProvisioningProfile>true</CodesignRequireProvisioningProfile>
    <DisableCodesignVerification>true</DisableCodesignVerification>
</PropertyGroup>

@rolfbjarne rolfbjarne added the need-info Waiting for more information before the bug can be investigated label Nov 13, 2023
@rolfbjarne rolfbjarne added this to the Future milestone Nov 13, 2023
@beeradmoore
Copy link

Even with the changes I am not seeing the splash screen on iOS simulator, I have repros of both,

Xamarin.iOS classic -
SplashScreenTest2.zip

net8-ios
SplashLogoTest.zip

As far as I can tell signing should be happening on both apps with my com.beeradmoore.* wildcard but it doesn't seem to fix the problem. Deploying to device does work, but it's so quick.

@microsoft-github-policy-service microsoft-github-policy-service bot added need-attention An issue requires our attention/response and removed need-info Waiting for more information before the bug can be investigated labels Nov 15, 2023
@rolfbjarne
Copy link
Member

OK, I see the condition doesn't work, just do this:

<PropertyGroup>
    <EnableCodeSigning>true</EnableCodeSigning>
    <CodesignRequireProvisioningProfile>true</CodesignRequireProvisioningProfile>
    <DisableCodesignVerification>true</DisableCodesignVerification>
</PropertyGroup>

This should work on device as well:

  • EnableCodeSigning defaults to true for device, so nothing changes.
  • CodesignRequireProvisioningProfilep also defaults to true for device
  • DisableCodesignVerification: assuming the code signing configuration in the project is correct, it shouldn't matter that the verification is skipped (and if it's broken, the app will fail to install on device anyways).

@rolfbjarne rolfbjarne added need-info Waiting for more information before the bug can be investigated and removed need-attention An issue requires our attention/response labels Nov 16, 2023
@beeradmoore
Copy link

Thanks for that update @rolfbjarne.

I can confirm that my two repros both work as expected and I can see the gradient splash screen when I remove Condition="$(RuntimeIdentifier.Contains('simulator'))"

@microsoft-github-policy-service microsoft-github-policy-service bot added need-attention An issue requires our attention/response and removed need-info Waiting for more information before the bug can be investigated labels Nov 16, 2023
@showtroylove
Copy link

Preamble

All, this issue is quite elusive, and annoying. My first instinct was to dismiss the possibility of a missing / mispelled image file name, but that's exactly what was hosing my Xaml app on iOS and Mac Catalyst. Like many, I wanted to get rid of the purple appicon and splash screen as my first or near first [re]action. I removed the .NET splash, appiconfg (fg: foreground) and appicon and merged the two appicon files into one file called appicon.svg. In doing so, I introduced a bug on iOS and Mac Catalyst platforms. The MAUI default template refers to the appiconfg.png in AppShell.xaml (at least in Shell based projects).

Resolution For My Project

You must find, confirm and / or replace image file names where ever you referenced them.

Additional Information

Also note, you must refer to all *.svg image assets by it's post processing name. Example: [image].svg => [image].png (see MAUI Icon documentation for more on that little magic trick).

@rolfbjarne
Copy link
Member

Thanks for that update @rolfbjarne.

I can confirm that my two repros both work as expected and I can see the gradient splash screen when I remove Condition="$(RuntimeIdentifier.Contains('simulator'))"

Thanks for confirming!

I'll close this as a duplicate of #18469 then.

@rolfbjarne
Copy link
Member

Preamble

All, this issue is quite elusive, and annoying. My first instinct was to dismiss the possibility of a missing / mispelled image file name, but that's exactly what was hosing my Xaml app on iOS and Mac Catalyst. Like many, I wanted to get rid of the purple appicon and splash screen as my first or near first [re]action. I removed the .NET splash, appiconfg (fg: foreground) and appicon and merged the two appicon files into one file called appicon.svg. In doing so, I introduced a bug on iOS and Mac Catalyst platforms. The MAUI default template refers to the appiconfg.png in AppShell.xaml (at least in Shell based projects).

Resolution For My Project

You must find, confirm and / or replace image file names where ever you referenced them.

Additional Information

Also note, you must refer to all *.svg image assets by it's post processing name. Example: [image].svg => [image].png (see MAUI Icon documentation for more on that little magic trick).

I would suggest filing an issue in the MAUI repository for this (https://github.com/dotnet/maui/issues/new)

@last-Programmer
Copy link
Author

@rolfbjarne The workaround fixes the issue for me. thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need-attention An issue requires our attention/response
Projects
None yet
Development

No branches or pull requests

4 participants