locked
iOS 13.0 Broke MasterDetailPage on iPads? RRS feed

  • Question

  • User28603 posted

    I have noticed that after updating iOS to v13.0, the MasterDetailPage is broken on iPads but it's still working on iPhones and Androids. By broken I mean the whole page is white, without content.


    The only way to fix this is to update Xamarin.Forms to the latest v4.2+.

    The problem is that some other packages are not compatible (XF broke something else after v4.0) so I cannot update XF yet. The App Store is rejecting my app because it shows a white screen on iPads with iOS 13.0+....so I would have to stop targeting iPads!

    Try for yourself, here is a basic sample repo with MasterDetail page (the default Xamarin Forms template with MasterDetailPage). https://github.com/stesvis/MasterDetailTest2

    The same happens with Prism MasterDetailsPage: https://github.com/stesvis/MasterDetailTest

    • iPhones: works
    • iPad -> iOS 12.2: works
    • iPad -> iOS 13.0: white screen

    Any solution for this HUGE headache?

    Monday, September 30, 2019 8:36 PM

All replies

  • User129559 posted

    For now, you can just copy the renderer into your project and give it a few tweaks. Then you can get the 4.2 renderer for MDP on your older app.

    Monday, September 30, 2019 8:53 PM
  • User352505 posted

    @AdamMeaney said: For now, you can just copy the renderer into your project and give it a few tweaks. Then you can get the 4.2 renderer for MDP on your older app.

    Could you please describe this solution in more detail?

    Tuesday, October 1, 2019 2:30 PM
  • User129559 posted

    In the Xamarin Source Code, you can see the newest version of the Renderer for this control.

    Copy it into your iOS project, add an ExportRenderer line at the top, and edit anything that Xamarin has internal out.

    Should get you a mostly working MDP for now if you need it.

    Tuesday, October 1, 2019 2:33 PM
  • User67515 posted

    This is what I've done to skip changes in the code or XF packages:

    My tested code is running XF3.6, so I've moved my machine from Xcode11 / VS2019 to VS2017 and XCode10.2... After my release I'll be migrating my XF packages to 4.2 and update my VS to 2019 and Xcode11.

    Tuesday, October 1, 2019 9:19 PM
  • User298237 posted

    Thanks a lot Stesvis for suggesting that an update to Xamarin Forms will fix the issue.

    I had the same issue, and thankfully, I can update Xamarin forms. That fixed it for me and Apple has approved my app.

    Best of luck.

    Tuesday, October 1, 2019 10:25 PM
  • User28603 posted

    Glad to hear @Kuan_Toom
    I spent the last two days trying to implement workarounds for the things that instead XF 4.2 broke....

    Now i finally was able to submit the app, we'll see!

    Wednesday, October 2, 2019 12:14 AM
  • User62397 posted

    Hey all)

    I also faced that issue for my XF app. But I can't update XF due some other reasons, so - I tried to replace Xamarin iOS renderer for tablet MD page to support iOS 13+. The funny thing - I did it :smiley: So, here is a sample in attachment, I hope it could help somebody in such situation.

    Thursday, October 3, 2019 1:31 PM
  • User291587 posted

    it works, thx Alexander

    Wednesday, October 9, 2019 2:45 PM
  • User295584 posted

    @AdamMeaney , @AlexanderGertsyk Thanks!

    I could get my App showing again MasterDetailPage by using the code shared by @AlexanderGertsyk , where i also needed to add the line for exporting the renderer.

    I attached a file with that minimal modification.

    Wednesday, October 16, 2019 8:16 AM
  • User291587 posted

    deczaloth which XF do you have?

    Wednesday, October 16, 2019 12:56 PM
  • User295584 posted

    @PiotrPastuszka , i use Xamarin.Forms 3.6. The issue arises only with version old Xamarin.Forms versions (i am not sure in which version exactly it arises).

    Friday, October 18, 2019 6:54 AM
  • User389608 posted

    Thank you so so much for bringing this to my attention, I have lost days trying to fix this issue - iOS is new to me so I assumed it was something I was doing wrong! Didn't want to see this and not even stop to say thank you :) Can I just ask actually if anyone has any advice on handling UI changes since upgrading from forms v3 to v4, seems that font sizing is very odd, UI does not look as good as it did

    Tuesday, October 22, 2019 1:22 PM
  • User389894 posted

    I have just tried with the changes suggested by @deczaloth and the file you provided, but the issue persists (white screen on both orientations). Does anyone have any further suggestions?

    To provide a better understanding, our configuration is as follows:

    Xamarin.Forms version (4.3.0.908675); iPad Pro (3rd generation), Software version: 13.1.3; Xcode version 11.1; Visual Studio for Mac, Version 8.3.4 (build 8)

    Tuesday, October 22, 2019 2:22 PM
  • User355485 posted

    I also faced this issue,master detail page working fine on Android,iPhone,but inside iPad its showing blank screen.

    After update Xamarin Forms Latest version(4.3) its working fine. :)

    Thursday, October 24, 2019 7:02 AM
  • User28603 posted

    @AdamMeaney what should the [ExportRenderer] annotation look like in this case?

    [assembly: ExportRenderer(typeof(???), typeof(???))]

    Thursday, October 24, 2019 6:21 PM
  • User129559 posted

    [assembly:ExportRenderer(typeof(MasterDetailPage), typeof(TabletMasterDetailRendererCopy), UIUserInterfaceIdiom.Pad)]

    Thursday, October 24, 2019 6:26 PM
  • User28603 posted

    @AdamMeaney said: [assembly:ExportRenderer(typeof(MasterDetailPage), typeof(TabletMasterDetailRendererCopy), UIUserInterfaceIdiom.Pad)]

    Thank you!

    Thursday, October 24, 2019 6:48 PM
  • User368074 posted

    Guys, I know some of you can't upgrade to XF 4.3 but honestly is the best choice. I had the same issue and i can confirm the upgrade fixes it.

    Thursday, October 31, 2019 6:40 PM
  • User390381 posted

    @Harshita said: I also faced this issue,master detail page working fine on Android,iPhone,but inside iPad its showing blank screen.

    After update Xamarin Forms Latest version(4.3) its working fine. :)

    also work for me.

    Thursday, November 14, 2019 6:56 AM
  • User243973 posted

    @deczaloth said: @AdamMeaney , @AlexanderGertsyk Thanks!

    I could get my App showing again MasterDetailPage by using the code shared by @AlexanderGertsyk , where i also needed to add the line for exporting the renderer.

    I attached a file with that minimal modification.

    Thank You. this trick worked for me without updating XF.

    Friday, December 13, 2019 11:33 AM
  • User392097 posted

    @AdamMeaney @AlexanderGertsyk thank bro you save my time :)

    Wednesday, January 8, 2020 9:05 AM
  • User305802 posted

    For me it was enough to upgrade from Xamarin.Forms from 3.1.0 to 3.6.0

    Thursday, January 23, 2020 2:18 PM
  • User368074 posted

    Anyone has faced the problem of drawer opening on landscape for the MasterPage, this happens in iOS 13.X. I can''t upgrade to XF 4.X. Any ideas would be appreciated

    Tuesday, February 4, 2020 7:34 PM
  • User270940 posted

    i did the upgrade to xamarin.forms 4.5 from 3.6 because of the white screen issue... but now some of my buttons are unresponsive

    Wednesday, April 8, 2020 4:16 AM
  • User67478 posted

    I'm using XF 3.4 and tried the fix with the custom renderer, but I still get the white page. I created a fake IShellContext class to get rid of the missing interface. Here is my code:

    MainPage.xaml

    <?xml version="1.0" encoding="utf-8" ?>
    <renderer:TabletMasterDetail xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:local="clr-namespace:YourNamespace.Pages;assembly=YourNamespace"
             xmlns:renderer="clr-namespace:YourNamespace.CustomRenderers;assembly=YourNamespace"
             x:Class="YourNamespace.Pages.MainPage">
      <renderer:TabletMasterDetail.Master>
        <local:MasterPage x:Name="masterPage" />
      </renderer:TabletMasterDetail.Master>
    </renderer:TabletMasterDetail>
    

    MainPage.xaml.cs

    public partial class MainPage : TabletMasterDetail
    {
        // ...
    }
    

    IShellContext.cs

    public interface IShellContext
    {
    }
    

    TabletMasterDetail.cs

    public class TabletMasterDetail : MasterDetailPage
    {
    }
    

    TabletMasterDetailRenderer.cs (code posted above)

    [assembly: ExportRenderer(typeof(YourNamespace.CustomRenderers.TabletMasterDetail), typeof(TabletMasterDetailRenderer), UIUserInterfaceIdiom.Pad)]
    namespace YourNamespace.iOS.CustomRenderers
    {
        internal class ChildViewController : UIViewController
        // ...
    }
    

    But this still leads to a white page! Now I upgraded to XF 3.6 and the design of the ListView is strange. At loading you see multiple rows with gray background and on finish it displays a black background for the unused space (when there a few cells).

    The same occurs (gray, black backgrounds) if I only use the custom renderer (and not inherit from TabletMasterDetail) and XF 3.6. The difference in the custom renderer is the export attribute:

    TabletMasterDetailRenderer.cs (code posted above)

    [assembly: ExportRenderer(typeof(Xamarin.Forms.MasterDetailPage), typeof(TabletMasterDetailRenderer), UIUserInterfaceIdiom.Pad)]
    namespace YourNamespace.iOS.CustomRenderers
    {
        internal class ChildViewController : UIViewController
        // ...
    }
    

    With XF 3.4 I only get a white page. Is this normal? Any suggestions?

    Wednesday, July 22, 2020 5:53 PM
  • User67478 posted

    Ok the reason for the black and gray backgrounds is the iOS Dark Mode ...

    Friday, July 24, 2020 9:57 AM