xamarin / Xamarin.Forms

Xamarin.Forms is no longer supported. Migrate your apps to .NET MAUI.
https://aka.ms/xamarin-upgrade
Other
5.63k stars 1.87k forks source link

[Bug] Shell - Initial menu item selected on Android, but not on iOS #15525

Open Glorfindel83 opened 2 years ago

Glorfindel83 commented 2 years ago

Description

When using Shell, after launching the application the initial menu item is selected on Android, but not on iOS.

Also reported on Stack Overflow.

Steps to Reproduce

  1. Create a new project, using the standard Flyout App template
  2. Launch the application

Expected Behavior

The menu item corresponding to the initial screen is selected (like it is on Android).

Actual Behavior

The menu item corresponding to the initial screen is not selected; selection only works after you switch to another menu item. See the screenshots below for clarification.

Basic Information

Environment

Show/Hide Visual Studio info ``` Visual Studio Enterprise 2022 for Mac Version 17.3.2 (build 24) Installation UUID: a493e396-5ce9-4a6f-8b47-65ee3a4fdd99 Runtime .NET 6.0.5 (64-bit) Architecture: Arm64 Roslyn (Language Service) 4.3.0-3.22312.2+52adfb8b2dc71ed4278debcf13960f2116868608 NuGet Version: 6.2.1.2 .NET SDK (Arm64) SDK: /usr/local/share/dotnet/sdk/6.0.400/Sdks SDK Versions: 6.0.400 6.0.302 6.0.301 6.0.300 6.0.100 MSBuild SDKs: /Applications/Visual Studio.app/Contents/MonoBundle/MSBuild/Current/bin/Sdks .NET SDK (x64) SDK Versions: 6.0.400 6.0.302 6.0.301 6.0.300 5.0.408 3.1.422 3.1.421 3.1.420 3.1.419 .NET Runtime (Arm64) Runtime: /usr/local/share/dotnet/dotnet Runtime Versions: 6.0.8 6.0.7 6.0.6 6.0.5 6.0.0 .NET Runtime (x64) Runtime: /usr/local/share/dotnet/x64/dotnet Runtime Versions: 6.0.8 6.0.7 6.0.6 6.0.5 5.0.17 3.1.28 3.1.27 3.1.26 3.1.25 Xamarin.Profiler Version: 1.8.0.19 Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler Updater Version: 11 Apple Developer Tools Xcode 13.4.1 (20504) Build 13F100 Xamarin.Mac Xamarin.Mac not installed. Can't find /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/Version. Xamarin.iOS Version: 15.12.0.2 (Visual Studio Enterprise) Hash: 87f98a75e Branch: d17-3 Build date: 2022-07-25 20:18:55-0400 Xamarin.Android Version: 13.0.0.0 (Visual Studio Enterprise) Commit: xamarin-android/d17-3/030cd63 Android SDK: /Users/gerwin/Library/Android/sdk Supported Android versions: 12.1 (API level 32) 11.0 (API level 30) 10.0 (API level 29) 13.0 (API level 33) SDK Command-line Tools Version: 7.0 SDK Platform Tools Version: 33.0.2 SDK Build Tools Version: 33.0.0 Build Information: Mono: dffa5ab Java.Interop: xamarin/java.interop/d17-3@7716ae53 SQLite: xamarin/sqlite/3.38.5@df4deab Xamarin.Android Tools: xamarin/xamarin-android-tools/main@14076a6 Microsoft Build of OpenJDK Java SDK: /Library/Java/JavaVirtualMachines/microsoft-11.jdk 11.0.12 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.3.0.23 Hash: 965bf40 Branch: remotes/origin/d17-3 Build date: 2022-08-18 19:05:53 UTC Android Device Manager Version: 0.0.0.1169 Hash: fafb1d5 Branch: fafb1d5 Build date: 2022-08-18 19:05:53 UTC Xamarin Designer Version: 17.3.0.208 Hash: 0de472ea0 Branch: remotes/origin/d17-3 Build date: 2022-08-18 19:05:48 UTC Build Information Release ID: 1703020024 Git revision: c1a3681e7dfad26a867f37f6666da40621931798 Build date: 2022-08-18 19:03:23+00 Build branch: release-17.3 Build lane: release-17.3 Operating System Mac OS X 12.5.1 Darwin 21.6.0 Darwin Kernel Version 21.6.0 Wed Aug 10 14:28:23 PDT 2022 root:xnu-8020.141.5~2/RELEASE_ARM64_T6000 arm64 ```

Screenshots

On Android, the initial menu item is selected:

On iOS, it is not:

The selection only starts to appear after you select other menu items:

Glorfindel83 commented 1 year ago

After upgrading to MAUI the issue was solved. I'm not sure how important it is to solve in Xamarin Forms ...