Forum Xamarin Xamarin.Forms

Upgrade 2.5.x -> 3.x

RabiSatterRabiSatter USMember, Developer Group Leader ✭✭
edited July 2018 in Xamarin.Forms

I am upgrading to Xamarin Forms 3.1 from 2.5.x. When running the form on iPhone X simulator I am now getting black bars. All the other phones work in full screen and no black bars. I googled around and saw this has something to do with Apple putting the app in some non-native mode. Then discussions on using storyboards. Not real useful since I am using Xamarin forms and no storyboards. I did try adding On<Xamarin.Forms.PlatformConfiguration.iOS>().SetUseSafeArea(false); to the base page all pages inherit from. Anyone know how do I get Xamarin working again full screen on iPhone X?

Deployment Target 9.0
Device Family iPhone
SDK version Default

Posts

  • ShantimohanElchuriShantimohanElchuri USMember ✭✭✭✭✭

    @RabiSatter What do you mean by 'black bars'? Can you post a screenshot?

  • JohnHJohnH GBMember ✭✭✭✭✭

    @RabiSatter said:
    I am upgrading to Xamarin Forms 3.1 from 2.5.x. When running the form on iPhone X simulator I am now getting black bars. All the other phones work in full screen and no black bars. I googled around and saw this has something to do with Apple putting the app in some non-native mode. Then discussions on using storyboards. Not real useful since I am using Xamarin forms and no storyboards. I did try adding On<Xamarin.Forms.PlatformConfiguration.iOS>().SetUseSafeArea(false); to the base page all pages inherit from. Anyone know how do I get Xamarin working again full screen on iPhone X?

    Deployment Target 9.0
    Device Family iPhone
    SDK version Default

    It sounds like the Apple requirement to be able to show an app supports full screen. This is normally handled with an app startup splash screen that is a storyboard.

  • CaptainXamtasticCaptainXamtastic GBUniversity ✭✭✭
    edited July 2018

    @RabiSatter At a glance, this looks like an iOS "safe area" issue - which is easily resolved simply by adding the following to the Xaml declarations of each ContentPage:

        xmlns:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core"
        ios:Page.UseSafeArea="true"
    
  • RabiSatterRabiSatter USMember, Developer Group Leader ✭✭


    I thought it was the safe area as well. However, in the constructor of my base page, I have

    On<Xamarin.Forms.PlatformConfiguration.iOS>().SetUseSafeArea(true);

  • AdamMeaneyAdamMeaney USMember ✭✭✭✭✭

    I have had similar issues not having the right size of launch screen images for that before I switched to using a storyboard for the iOS launch screen.

    Check you either have a proper storyboard or all the launch images.

  • RabiSatterRabiSatter USMember, Developer Group Leader ✭✭
    edited July 2018

    Ugh. I added a storyboard and now it works. I think to much device specific implementation detail is leaking into Xamarin Forms abstraction layer.

    By the way, the old version works correctly on Xamarin Forms 2.5 on iPhone X. There is something different in Xamarin Forms 3.x.

Sign In or Register to comment.