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

Unwanted Top and Bottom Spacing in .NET MAUI iOS Simulator #26080

Open
Piyush1430 opened this issue Nov 23, 2024 · 0 comments
Open

Unwanted Top and Bottom Spacing in .NET MAUI iOS Simulator #26080

Piyush1430 opened this issue Nov 23, 2024 · 0 comments
Labels
t/bug Something isn't working

Comments

@Piyush1430
Copy link

Piyush1430 commented Nov 23, 2024

Description

Problem
When running my .NET MAUI application on an iOS simulator (connected through Mac pairing), the app displays with unexpected blank spaces at the top and bottom of the screen. This issue occurs specifically on the iOS simulator despite successful connection and running of the simulator.
Environment

.NET MAUI (targeting net8.0)
macOS with Windows pairing
iOS Simulator
Visual Studio

What I've Tried

Set Shell.NavBarIsVisible="False" and NavigationPage.HasNavigationBar="False"
Added UIRequiresFullScreen in Info.plist
Confirmed proper simulator connection and running state

Expected Behavior
The app should fill the entire screen without any unwanted spacing at the top or bottom.
Actual Behavior
The app displays with unnecessary blank spaces at the top and bottom of the screen in the iOS simulator.
Relevant Code

##AppScreen Short
Image

Project File (Relevant Parts)

<PropertyGroup>
    <TargetFrameworks>net8.0-ios;net8.0-maccatalyst;net8.0-android34.0</TargetFrameworks>
    <OutputType>Exe</OutputType>
    <UseMaui>true</UseMaui>
    <SingleProject>true</SingleProject>
    <ImplicitUsings>enable</ImplicitUsings>
    <SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">11.0</SupportedOSPlatformVersion>
</PropertyGroup>

Info.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>LSRequiresIPhoneOS</key>
    <true/>
    <key>UIDeviceFamily</key>
    <array>
        <integer>1</integer>
        <integer>2</integer>
    </array>
    <key>UISupportedInterfaceOrientations</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
    </array>
    <key>UIRequiresFullScreen</key>
    <true/>
</dict>
</plist>

> ```

Visual Studio 2022 latest version
.Net Version:- 9.0.100-rc.2.24474.11
latest net maui workload both ios and windows 
@Piyush1430 Piyush1430 added the t/bug Something isn't working label Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant