PureWeen/ShanedlerSamples

Exception is thrown when I navigate to the third item in my tabbar (iOS)

edgiardina opened this issue · 10 comments

https://github.com/PureWeen/ShanedlerSamples/blob/main/ShanedlerSamples/Library/Workarounds/ShellWorkarounds.iOS.cs#L23

When I debug this from Visual Studio to my remote mac with my iPhone 12 plugged in, app loads up on first tab of my tabpage, but then I navigate to any other tab and I get the exception linked above

This doesn't happen as reliably on the simulator, but it does happen.

@edgiardina do you have a repro I can pull down and try to replicate the crash with?

https://github.com/edgiardina/IfpaMaui

App is very dependent on an IPFAapi key so I'm not sure if you can boot and run it without it; it should trap all errror a without it; but not sure if the errors happen then.

https://github.com/edgiardina/IfpaMaui

App is very dependent on an IPFAapi key so I'm not sure if you can boot and run it without it; it should trap all errror a without it; but not sure if the errors happen then.

Do you have a full stack trace?

   at Maui.FixesAndWorkarounds.ShellWorkarounds.CreatePageRendererTracker() in C:\Users\ed_gi\source\repos\IfpaMaui\Workarounds\Workarounds\ShellWorkarounds.iOS.cs:line 23
   at Microsoft.Maui.Controls.Handlers.Compatibility.ShellRenderer.Microsoft.Maui.Controls.Platform.Compatibility.IShellContext.CreatePageRendererTracker()
   at Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRootRenderer.ViewDidLoad()
   at UIKit.UIApplication.UIApplicationMain(Int32 argc, String[] argv, IntPtr principalClassName, IntPtr delegateClassName)
   at UIKit.UIApplication.Main(String[] args, Type principalClass, Type delegateClass)
   at Ifpa.Program.Main(String[] args) in C:\Users\ed_gi\source\repos\IfpaMaui\Platforms\iOS\Program.cs:line 13
   at Maui.FixesAndWorkarounds.ShellWorkarounds.CreatePageRendererTracker() in C:\Users\ed_gi\source\repos\IfpaMaui\Workarounds\Workarounds\ShellWorkarounds.iOS.cs:line 23
   at Microsoft.Maui.Controls.Handlers.Compatibility.ShellRenderer.Microsoft.Maui.Controls.Platform.Compatibility.IShellContext.CreatePageRendererTracker()
   at Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRootRenderer.ViewDidLoad()
   at UIKit.UIApplication.UIApplicationMain(Int32 argc, String[] argv, IntPtr principalClassName, IntPtr delegateClassName)
   at UIKit.UIApplication.Main(String[] args, Type principalClass, Type delegateClass)
   at Ifpa.Program.Main(String[] args) in C:\Users\ed_gi\source\repos\IfpaMaui\Platforms\iOS\Program.cs:line 13

Alright, I pushed a new build. I didn't super test it but I tried with a bunch of tabs on iOS and it didn't crash for me so 🤞

Thanks dude. I had filed another bug around bar color... am I using it wrong, is there a reason for the white?

Your fix has resolved this issue in my project. Thank you for building this, the menu/shell behavior is much better and almost a dupe of xamarin forms.

Your fix has resolved this issue in my project. Thank you for building this, the menu/shell behavior is much better and almost a dupe of xamarin forms.

Yay!! If there's any part of the titlebar being weird let me know.

almost a dupe of xamarin forms.

Is there something XF stills does better? is this working better than forms?

Is there something XF stills does better? is this working better than forms?

I filed this, I'm using a third party package to get around it but navbar and toolbar icons don't color the same in in MAUI as they do in XamForms.
dotnet/maui#9240

Did you see my comment/other issue about the background bar color? I pulled the code directly and am not using the nuget because my toolbar is always white in iOS