dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.28k stars 1.76k forks source link

iOS app startup slow in debug #11392

Open davidortinau opened 2 years ago

davidortinau commented 2 years ago

Description

When debugging iOS the app stalls for a long time on the splash screen. Android is significantly faster. I'm using defaults from a clean install on Ventura. VS Mac 17.4 stable, and .NET 7 GA.

https://user-images.githubusercontent.com/41873/202016900-e3cde432-18d2-4351-8703-3bc59728164e.mp4

Steps to Reproduce

Run the CarouselViewDemos project from our samples. Update to 7.0.

Link to public reproduction project repository

https://github.com/dotnet/maui-samples/blob/main/6.0/UserInterface/Views/CarouselViewDemos/

Version with bug

7.0 (current)

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

16

Did you find any workaround?

nope

Relevant log output

No response

PureWeen commented 2 years ago

@rolfbjarne

ghost commented 2 years ago

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

rolfbjarne commented 2 years ago

This looks a bit slower than it should be, but I can't repro with the referenced sample project.

So I have a few questions:

davidortinau commented 2 years ago

@rolfbjarne

Are all projects slow, or just this one?

all

Is the app just as slow to launch if you tap on it in the simulator?

yes

If you have an iOS device, do you see the same slowness there as well?

If I can get the app only a device, I'll let you know. :(

Is there anything printed in the Application Output in VSMac when the app is launching?

This is what I see while the splash is up until the app is loaded.

xcrun simctl launch --stdout=/dev/ttys001 --stderr=/dev/ttys002 --terminate-running-process 40257B3B-DE4C-4F6E-BE77-D724EFA7900F com.simplyprofound.carouselviewdemos -monodevelop-port 10000
com.simplyprofound.carouselviewdemos: 66898
objc[66898]: Class CDPCABackupRecoveryReporter is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/CoreCDPInternal.framework/CoreCDPInternal (0x15ff1fa48) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/CoreCDP.framework/CoreCDP (0x15ed23958). One of the two will be used. Which one is undefined.
objc[66898]: Class CDPCAReporter is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/CoreCDPInternal.framework/CoreCDPInternal (0x15ff1ef58) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/CoreCDP.framework/CoreCDP (0x15ed23ae8). One of the two will be used. Which one is undefined.
objc[66898]: Class SBFCARendererImageRepresentation is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/SpringBoardFoundation.framework/SpringBoardFoundation (0x15f247028) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/PaperBoardUI.framework/PaperBoardUI (0x15f535218). One of the two will be used. Which one is undefined.
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/Microsoft.iOS.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.Runtime.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.Collections.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.Runtime.InteropServices.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.Threading.Thread.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.Threading.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/CarouselViewDemos.dll
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/Microsoft.Maui.Controls.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.ObjectModel.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/Microsoft.Maui.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/Microsoft.Maui.Controls.Xaml.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.ComponentModel.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.Private.Uri.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/Microsoft.Maui.Graphics.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.Numerics.Vectors.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.Xml.ReaderWriter.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.Private.Xml.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.Memory.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.Diagnostics.TraceSource.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.Collections.NonGeneric.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.Collections.Specialized.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.ComponentModel.Primitives.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.Text.RegularExpressions.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.Reflection.Emit.ILGeneration.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.Collections.Concurrent.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.Reflection.Emit.Lightweight.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.Reflection.Primitives.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.Net.Primitives.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.Diagnostics.Tracing.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/Microsoft.Win32.Primitives.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.Net.Http.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.Net.Security.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.Security.Cryptography.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.Formats.Asn1.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.Text.Encoding.Extensions.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.Runtime.Numerics.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.Net.Sockets.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.Net.NameResolution.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.Threading.ThreadPool.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.Security.Claims.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.Linq.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.Diagnostics.DiagnosticSource.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.Net.Quic.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.IO.Compression.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.IO.Compression.Brotli.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.Threading.Channels.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.Net.NetworkInformation.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.Reflection.Emit.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.Runtime.Loader.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.Linq.Expressions.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.ComponentModel.TypeConverter.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.Drawing.Primitives.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.Runtime.Serialization.Formatters.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.Resources.Writer.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.Xml.XDocument.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.Private.Xml.Linq.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/Microsoft.Extensions.Logging.Abstractions.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/Microsoft.Extensions.DependencyInjection.Abstractions.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/Microsoft.Maui.Essentials.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/System.Console.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/Microsoft.Extensions.Configuration.Abstractions.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/Microsoft.Extensions.Primitives.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/Microsoft.Extensions.Configuration.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/Microsoft.Extensions.Logging.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/Microsoft.Extensions.Options.dll [External]
Loaded assembly: /Users/dmo/Library/Developer/CoreSimulator/Devices/40257B3B-DE4C-4F6E-BE77-D724EFA7900F/data/Containers/Bundle/Application/34132EC2-B9B4-48CD-AC24-FBFCCC2967CF/CarouselViewDemos.app/Microsoft.Extensions.DependencyInjection.dll [External]
2022-11-18 15:13:50.758986-0600 CarouselViewDemos[66898:2256383] SecTaskLoadEntitlements failed error=22 cs_flags=200, pid=66898
2022-11-18 15:13:50.762169-0600 CarouselViewDemos[66898:2256383] SecTaskCopyDebugDescription: CarouselViewDemo[66898]/0#-1 LF=0
2022-11-18 15:13:50.882694-0600 CarouselViewDemos[66898:2256383] SecTaskLoadEntitlements failed error=22 cs_flags=200, pid=66898
2022-11-18 15:13:50.883569-0600 CarouselViewDemos[66898:2256383] SecTaskCopyDebugDescription: CarouselViewDemo[66898]/0#-1 LF=0
2022-11-18 15:13:51.742946-0600 CarouselViewDemos[66898:2257028] SecTaskLoadEntitlements failed error=22 cs_flags=200, pid=66898
2022-11-18 15:13:51.743650-0600 CarouselViewDemos[66898:2257028] SecTaskCopyDebugDescription: CarouselViewDemo[66898]/0#-1 LF=0
2022-11-18 15:13:52.113644-0600 CarouselViewDemos[66898:2256383] [TableView] Warning once only: UITableView was told to layout its visible cells and other contents without being in the view hierarchy (the table view or one of its superviews has not been added to a window). This may cause bugs by forcing views inside the table view to load and perform layout without accurate information (e.g. table view bounds, trait collection, layout margins, safe area insets, etc), and will also cause unnecessary performance overhead due to extra layout passes. Make a symbolic breakpoint at UITableViewAlertForLayoutOutsideViewHierarchy to catch this in the debugger and see what caused this to occur, so you can avoid this action altogether if possible, or defer it until the table view has been added to a window. Table view: <_UIMoreListTableView: 0x7f9f0fe81000; frame = (0 0; 0 0); clipsToBounds = YES; gestureRecognizers = <NSArray: 0x600000e28330>; backgroundColor = <UIDynamicSystemColor: 0x600001566880; name = tableBackgroundColor>; layer = <CALayer: 0x6000007c3880>; contentOffset: {0, 0}; contentSize: {0, 0}; adjustedContentInset: {0, 0, 0, 0}; dataSource: <UIMoreListController: 0x7f9f0e738c10>>
2022-11-18 15:13:52.628459-0600 CarouselViewDemos[66898:2256541] Warning: observer object was not disposed manually with Dispose()
2022-11-18 15:13:52.628861-0600 CarouselViewDemos[66898:2256541] Warning: observer object was not disposed manually with Dispose()
davidortinau commented 2 years ago

@rolfbjarne I was able to deploy to my iPhone 14 Pro and the startup screen only appeared for a few seconds. That's what I expect to see on the simulator as well, not 30s+ very time even with XAML Hot Reload disabled.

rolfbjarne commented 2 years ago

This is somewhat strange :/

JohnHunterACS commented 1 year ago

@davidortinau this might help, no promises though. I've just spent the entire day fighting slow start-up on my iPad, so slow that iOS was killing the app. I started messing about with Hot Reload based on your comments and found the following - 1) disable Hot Reload for Xamarin but leaving it enabled for MAUI 2) build + run MAUI project on the physical device 3) re-enable Xamarin options 4) build + run MAUI project on the physical device

Now the app launches fast enough so iOS doesn't kill it and also Hot Reload has started working.

As I say, no promises since your problems are with the simulator and mine were with a physical device.

jeromelaban commented 1 year ago

@rolfbjarne we're having similar issues (https://github.com/unoplatform/uno/issues/10748) with Uno apps, the startup is slow enough that the app is getting killed by the OS. We tried disabling Hot Reload (not sure if it applies) and disabling the Interpreter, but it does not help.

rolfbjarne commented 1 year ago

@jeromelaban that stack trace here: https://user-images.githubusercontent.com/57812285/208118459-60395490-51c2-4b78-aa97-68e0b4caed15.png makes me think it's a deadlock of some kind. A fully symbolicated crash report will show what the app is doing (this requires disabling the interpreter to be useful), alternative I can have a look if I get a test project.

jeromelaban commented 1 year ago

@rolfbjarne thanks for looking it up! We'll check that, thanks.

MaximG1234 commented 1 year ago

I am in the exact same situation, my app wasnt starting at all. So I tried https://github.com/dotnet/maui-samples -> WorkingWithMaps example and I am getting the exact same behaviour.

I know very little regarding iOS dev but looks to me like a watchdog as mentioned is terminating the app after prolonged period of time.

I tried disabling Hot Reload for Maui but that hasnt helped either. Any suggestions?

I don't understand how this can be moved to 'the Backlog milestone. ' given that it literally prevents development on iOS devices? Is there anything more severe than a showstopper bug?

Loaded assembly: /private/var/containers/Bundle/Application/C8D1844A-F505-4540-BB1F-01E1C9FC8B99/WorkingWithMaps.app/Microsoft.iOS.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/C8D1844A-F505-4540-BB1F-01E1C9FC8B99/WorkingWithMaps.app/System.Runtime.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/C8D1844A-F505-4540-BB1F-01E1C9FC8B99/WorkingWithMaps.app/System.Collections.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/C8D1844A-F505-4540-BB1F-01E1C9FC8B99/WorkingWithMaps.app/System.Runtime.InteropServices.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/C8D1844A-F505-4540-BB1F-01E1C9FC8B99/WorkingWithMaps.app/System.Threading.Thread.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/C8D1844A-F505-4540-BB1F-01E1C9FC8B99/WorkingWithMaps.app/System.Threading.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/C8D1844A-F505-4540-BB1F-01E1C9FC8B99/WorkingWithMaps.app/System.Net.Http.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/C8D1844A-F505-4540-BB1F-01E1C9FC8B99/WorkingWithMaps.app/System.Net.Primitives.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/C8D1844A-F505-4540-BB1F-01E1C9FC8B99/WorkingWithMaps.app/System.Numerics.Vectors.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/C8D1844A-F505-4540-BB1F-01E1C9FC8B99/WorkingWithMaps.app/System.Net.Sockets.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/C8D1844A-F505-4540-BB1F-01E1C9FC8B99/WorkingWithMaps.app/System.Drawing.Primitives.dll [External]
Loaded assembly: /private/var/containers/Bundle/Application/C8D1844A-F505-4540-BB1F-01E1C9FC8B99/WorkingWithMaps.app/System.Private.Uri.dll [External]
The app has been terminated.
spouliot commented 1 year ago

@rolfbjarne I can duplicate this with dotnet new ios and VSfM. I used net6.0-ios since it's LTS.

I just put a breakpoint on the first line, start debugging on my iPhone 12 (iOS 16.2) and wait 20 seconds for the watchdog to kill the app.

Window = new UIWindow (UIScreen.MainScreen.Bounds);

Has something changed in mlaunch that would make the OS not think the process is being debugged ? IIRC the watchdog was an issue solved a long time ago (monotouch era).

Weirdly this crash does not get symbolicated for me neither... even if I had (sadly) no such issue with other projects :) OTOH I'm pretty sure it's just pointing to the current line of code (breakpoint) and debugger.

MaximG1234 commented 1 year ago

As a follow-up I initially thought this problem might be isolated to the fact that I was using an older device iPhone 6s but I have just tested against an iPhone SE and experienced the same behaviour so this definitely appears to be a bug across at least multiple if not all devices.

JohnHunterACS commented 1 year ago

@MaximG1234 Try setting the Linker Behavior to "Link Framework SDKs only"

MaximG1234 commented 1 year ago

Hi @JohnHunterACS, Thanks just tried that with iPhone 6S and no difference, will try it with another device when I get a chance but doesn't appear to be related.

I'm surprised there aren't more people posting regarding this issue.

rolfbjarne commented 1 year ago

@rolfbjarne I can duplicate this with dotnet new ios and VSfM. I used net6.0-ios since it's LTS.

I just put a breakpoint on the first line, start debugging on my iPhone 12 (iOS 16.2) and wait 20 seconds for the watchdog to kill the app.

Window = new UIWindow (UIScreen.MainScreen.Bounds);

Has something changed in mlaunch that would make the OS not think the process is being debugged ? IIRC the watchdog was an issue solved a long time ago (monotouch era).

Weirdly this crash does not get symbolicated for me neither... even if I had (sadly) no such issue with other projects :) OTOH I'm pretty sure it's just pointing to the current line of code (breakpoint) and debugger.

We solved the watchdog problem for the simulator, but never for device.

For device the process must be started with the native debugger (lldb/gdb-server) to keep the watchdog quiet, and that had other consequences (slower startup, mono's use of signals would confuse lldb/gdb-server and cause random crashes, etc.)

jeromelaban commented 1 year ago

@rolfbjarne what changed between xamarin and net6+ that changed that behavior? Or is it iOS that changed?

rolfbjarne commented 1 year ago

@jeromelaban afaik it's never been possible to put a breakpoint in the FinishedLaunching method on device and not have watch dog trigger after 20s.

spouliot commented 1 year ago

We solved the watchdog problem for the simulator, but never for device.

@rolfbjarne damn, I preferred the confort of my memories ;-) I guess I mixed up the sim fix and the fact we knew how (native debugger) it could be avoided.

ertandk commented 1 year ago

The newly created application opens in more than 8 seconds, regardless of debug or release. My phone iphone 11 is a real device.

Is there a solution?

rolfbjarne commented 1 year ago

@ertandk please file a new issue with a test project, and we'll have a look. Each project is different, so without a test project we won't be able to say anything about your project in particular.

ertandk commented 1 year ago

https://we.tl/t-BadrdHa5S7 the project is a .net 6.0 project created from scratch. (I also tried with 7.0, there was no change in speed.)

https://user-images.githubusercontent.com/22075526/217233620-479ffc70-5573-4682-bed7-fefb4739f6c0.mp4

ertandk commented 1 year ago

android.webm android emulator and android is very fast on real device. But on ios real device, this situation is very slow.

MaximG1234 commented 1 year ago

@ertandk please file a new issue with a test project, and we'll have a look. Each project is different, so without a test project we won't be able to say anything about your project in particular.

@ertandk I have not had a chance yet to try this on another computer but I have already provided an example application where this issue is replicable in the above comment (https://github.com/dotnet/maui-samples). On my machine, the last time I checked I cannot debug any iOS application on a real device and it is clear (or at least likely IMO) these issues are related given the error messages I am receiving.

Obviously it is possible this is isolated to my machine and I will comment when I've had a chance to try on another (should be in the next week or so) but I have no reason to believe that this is specific to me given there are clearly other users who are experiencing the same (or very similar) issue, I have already tried multiple iOS devices with the same results.

ertandk commented 1 year ago

@rolfbjarne Hello, were you able to review? What advice do you have regarding this situation? Because these times are too long for users.

rolfbjarne commented 1 year ago

@ertandk please provide a link to a GitHub repository as explained here: https://github.com/dotnet/maui/blob/main/.github/repro.md

ertandk commented 1 year ago

@rolfbjarne https://github.com/ertandk/test1234 Hello, This is the project where I created android and ios videos. Runs were performed as Release, the main problem is that the splash screen takes up to 8 seconds on iOS iphone 11 real device. Thank you.

rolfbjarne commented 1 year ago

@ertandk that launches pretty much instantly for me when I tap on the app on the device. Are you launching using the IDE, or tapping on the app?

ertandk commented 1 year ago

@ertandk that launches pretty much instantly for me when I tap on the app on the device. Are you launching using the IDE, or tapping on the app?

@rolfbjarne

I install the application on my real phone with Release by choosing Local Device with iOS.

I have to start it by clicking the application on the iOS phone.

On Android, there is no problem with the opening speed in the release state. Only iOS has this long wait. https://github.com/dotnet/maui/issues/11392#issuecomment-1420626805 like here.

rolfbjarne commented 1 year ago

@ertandk since I can't reproduce any slowdown, can you profile using Instruments (https://github.com/xamarin/xamarin-macios/wiki/Profiling-App-Launch), and attach the resulting profile here?

ertandk commented 1 year ago

@ertandk since I can't reproduce any slowdown, can you profile using Instruments (https://github.com/xamarin/xamarin-macios/wiki/Profiling-App-Launch), and attach the resulting profile here?

@rolfbjarne I think it can be done on windows as well, I'm using visual studio 2022 17.4.4. There is a question I am wondering; How many seconds does the splash screen last for you on a real iOS device?

Even though I created a zero project, iOS still waits for a long splash screen.

ertandk commented 1 year ago

@rolfbjarne

Today I had the opportunity to find and test a macbook. I got fast results when I created a project on Macbook visual studio and uploaded it as iOS release.

However, when I install the same project as iOS release on windows, the SPLASH screen lasts for >8 seconds and opens.

I think the problem is valid in windows based builds. It's only like that in iOS builds. There is no problem with Android-based assemblies.

https://stackoverflow.com/questions/72486659/why-maui-app-startup-time-on-ios-is-so-slow is another stackoverflow topic opened in addition.

rolfbjarne commented 1 year ago

However, when I install the same project as iOS release on windows, the SPLASH screen lasts for >8 seconds and opens.

If you're not connected remotely to a Mac when building from Windows, the app will be optimized for fast debug iteration (Hot Restart: https://learn.microsoft.com/en-us/xamarin/xamarin-forms/deploy-test/hot-restart), and launch time suffers as a result. Also note that these builds are not valid for submission to the App Store (so you can't submit such an app by accident for instance).

nmg196 commented 1 year ago

I'm seeing the same thing on an iPhone 12 Pro with the (empty) demo Maui app. The splash screen takes at least 8 seconds in the demo app. This seems excessive as this doesn't happen with much older Xamarin apps. What's also odd is that it's not any faster if you kill the app and try a second time, where as second starts of legacy Xamarin apps are practially instant the second time - you hardly even notice the splash screen.

You don't even need to be debugging - it's just slow if I launch the app with a USB cable even connected. I'm not sure if this is normal or not as I don't have an Android device to compare with currently.

OMendozaG commented 1 year ago

Same here. But even in release version and without connected debug. Empty demo takes 8 seconds to pass the splash screen on an iPhone 14 Pro Max.

With the Xamarin expiration date around the corner, we don't see MAUI as mature enough to move our application. 8 seconds of splash loading before any code calls is intolerable...

Do we have to switch to Flutter? Come on Microsoft... you can do it...

OMendozaG commented 1 year ago

The System.Numerics.Vectors.dll and System.Private.Uri.dll files are the ones that slow down the loading the most in our case by far.

Is there nothing we can do? Isn't MAUI an option? We need answers please...

ertandk commented 1 year ago

I guess the only quick solution is to have a macbook... or to switch directly to a different platform, for example react native... otherwise with an update the look of your project can change completely!

OMendozaG commented 1 year ago

I guess the only quick solution is to have a macbook... or to switch directly to a different platform, for example react native... otherwise with an update the look of your project can change completely!

What surprises me is that Microsoft develops some of its apps with REACT Native. If they don't even bet on their own technologies, how can we?

nmg196 commented 1 year ago

According to this StackOverflow article, the slowness is only when you deploy a debug build from VS.NET straight to a phone, it doesn't affect release mode apps:

https://stackoverflow.com/questions/72486659/why-maui-app-startup-time-on-ios-is-so-slow

Zhanglirong-Winnie commented 1 year ago

Verified this issue with Visual Studio Enterprise 17.7.0 Preview 2.0 and 17.6 (build 1575). Can repro on iOS platform with sample project. Black screen appears for a long time when the iOS simulator loads the project. https://github.com/dotnet/maui-samples/tree/main/7.0/UserInterface/Views/CarouselViewDemos Windows: 11392 Mac: 11392-1

RobTF commented 1 year ago

This is a major issue for us, stuck on a long list of Loaded assembly xxxx log entries before the device just gives up - makes debugging impossible. I'm wondering - can the underlying runtime simply execute past DidFinishLaunching before invoking any of the .NET stuff?

i.e.

Jerreck commented 1 year ago

howdy folks! wanted to say i ran into this same issue while in release config but not debug. i had made a custom control that was wrapped around a grid. this custom control only exists to adjust the keyboard and screen positioning on ios (another issue with maui). when i moved this custom control to instead be a child of the grid, the issue went away. example below

this makes the app load slow:

`

</control:FixedScrollView> `

this does not

`

`

im building on an m1 chip mac mini locally and using the macos-latest image in azure pipelines. both produce the same results. dotnet 6 as well

SupermindPT commented 1 year ago

This is a major issue. Because of this I am unable to debug Xamarin Forms apps on physical Apple devices. Using a Mac mini as host, with the latest version of XCode installed, Visual Studio 2022 for Windows, latest version as well.

espenrl commented 1 year ago

Disabling XAML Hot Reload Android and iOS (Xamarin.Forms) reduced the load time sufficiently enough that the app isn't killed. But it is still slow from the point of view of being a developer waiting for the app to load.

RobTF commented 1 year ago

This is still a major problem and it's killing our dev loop. Any update?

nmg196 commented 1 year ago

I don't understand why this critical issue isn't being worked on. It makes MAUI unsuitable for iOS app development.

MaximG1234 commented 1 year ago

@nmg196 It's honestly ridiculous. I was excited when .NET 8 dropped hoping the issue would be resolved but nope, still the same problem. How is this literally not the No 1 priority for the Maui team?

nmg196 commented 1 year ago

I'm not convinced there still is a MAUI team - they aren't responding on here.

SupermindPT commented 1 year ago

Sad to hear this issue still exists in .net 8. I dont have time to create a PR, but I believe this would be fixed by loading the assemblies BEFORE deploying to the device, not AFTER.

Quaybe commented 11 months ago

It has been added to the .NET 8 SR2 milestone at least. Maybe we'll have a fix yet!