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

ios Shell #22452

Open
Gekidoku opened this issue May 16, 2024 · 3 comments
Open

ios Shell #22452

Gekidoku opened this issue May 16, 2024 · 3 comments
Assignees
Labels
area-controls-shell Shell Navigation, Routes, Tabs, Flyout platform/iOS 🍎 potential-regression This issue described a possible regression on a currently supported version., verification pending s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@Gekidoku
Copy link

Gekidoku commented May 16, 2024

Description

Im having a small issue with my Shell.
This used to work the way i have it right now. but since i installed .net 8.0.5 on my mac and the latest workload it stopped working.
In my function I set the mainpage like so

App.AppShell = new AppShellPlanning() { BackgroundColor = Colors.Black };
MainThread.BeginInvokeOnMainThread(async () =>
{
    await Task.Delay(100);
    App.Current.MainPage = App.AppShell;
});

The delay is there for an earlier issue, if didnt stick it in there it would crash sometimes back in ios 16.something.

Now when it executes with XCode 15.2 on an iphone simulator for 17.0 it gets to the last line and then logs this in the console

[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: 0x118af7e00; frame = (0 0; 0 0); clipsToBounds = YES; gestureRecognizers = <NSArray: 0x600000cc3cc0>; backgroundColor = <UIDynamicSystemColor: 0x6000017cad00; name = tableBackgroundColor>; layer = <CALayer: 0x600000bc09e0>; contentOffset: {0, 0}; contentSize: {0, 0}; adjustedContentInset: {0, 0, 0, 0}; dataSource: <UIMoreListController: 0x1077b4600>>

What is odd is that my shell only has this in it at the moment (stripped everything away to see what was causing it)

 public AppShellPlanning()
 {
     InitializeComponent();       
     Shell.SetTabBarIsVisible(this, false);
     var SplashPage = new FlyoutItem()
     {
         Title = "Dashboard",
         Icon = ImageSource.FromFile("Db.png"),

     };
     SplashPage.Items.Add(new ShellContent()
     {
         Route = "SplashPage",
         ContentTemplate = new DataTemplate(typeof(SplashPage)),
         
     });
    
     this.Items.Add(SplashPage);
}

If I change my mainpage code to just set a navigation page of Splashpage then it does work, but I need the shell navigation.

//This works but is not a solution
 MainThread.BeginInvokeOnMainThread(async () =>
 {
     await Task.Delay(100);
     App.Current.MainPage = new NavigationPage(new SplashPage()) { Style = Application.Current.Resources["MyNavPage"] as Style, };
 });

Using visual studio code on mac

Steps to Reproduce

No response

Link to public reproduction project repository

should throw the error on app launch

Version with bug

8.0.21 SR4.1

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

iOS

Did you find any workaround?

No response

Relevant log output

No response

@Gekidoku Gekidoku added the t/bug Something isn't working label May 16, 2024
Copy link
Contributor

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@Gekidoku
Copy link
Author

Attempted to build for ios 17.2 same result.
also the same when i build for ios 17.4.

on android this works

@PureWeen PureWeen added the potential-regression This issue described a possible regression on a currently supported version., verification pending label May 17, 2024
@PureWeen PureWeen self-assigned this May 17, 2024
@PureWeen PureWeen added this to the .NET 8 SR6 milestone May 17, 2024
@Eilon Eilon added the area-controls-shell Shell Navigation, Routes, Tabs, Flyout label May 17, 2024
@RoiChen001 RoiChen001 added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels May 21, 2024
@RoiChen001
Copy link
Collaborator

Can repro this issue at iOS platform on the latest 17.10 Preview 7(8.0.20&8.0.21).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-shell Shell Navigation, Routes, Tabs, Flyout platform/iOS 🍎 potential-regression This issue described a possible regression on a currently supported version., verification pending s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

5 participants