Skip to content

DeviceDisplay.Current.MainDisplayInfo.Orientation always showing Portrait for iOS 27 #39182

Description

@akhilvswoodplc

Description

After building with latest .net for ios sdk with Xcode 27, the DeviceDisplay.Current.MainDisplayInfo.Orientation is always showing Portrait. Also the MainDisplayInfoChanged event is not trigering

Steps to Reproduce

Add a page and add
DeviceDisplay.Current.MainDisplayInfoChanged += OnDisplayInfoChanged;
Build using latest .net 10 for iOS sdk and xcode 27.
Observe the event is not getting tirgerred

Link to public reproduction project repository

No response

Version with bug

10.0.110

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 27

Did you find any workaround?

No response

Relevant log output

Activity

  1. added
    t/bug
    on Oct 6, 2026
  2. kubaflo commented on Oct 6, 2026

    @kubaflo
    Contributor

    /issue triage

  3. kubaflo commented on Oct 6, 2026

    @kubaflo
    Contributor

    /issue triage

  4. github-actions commented on Oct 6, 2026

    @github-actions
    Contributor

    Issue triage invocation: issue-triage-command:6026374627

    Issue triage: validated label proposal

    This report describes the validated requested delta, not completed writes. Staged runs suppress writes; consult the workflow result for actual handler outcomes. Publication is not an atomic transaction.
    Issue triage decision: issue-triage-decision:add:E79FB0128F97F3A41ACCF2B96430BB048FDC63E19D5163AF77DAD7B2DE5F9BF1

    • add: area-essentials-devicedisplay - The reported failure concerns DeviceDisplay orientation and its display-info change event.
      Evidence: issue:39182.
      Issue triage decision: issue-triage-decision:add:3938F43EC6C34DBC90F219675E84D4140803B76D488A383C94BD4682369BB584
    • add: platform/ios - The report explicitly identifies iOS as the affected platform.
      Evidence: issue:39182.
      Issue triage decision: issue-triage-decision:add:B90F347019593061F83ADAF5231303138331A59BB4F91686E01D86796AF13D2A
    • add: potential-regression - The reporter states this previously worked in MAUI, but gives no known working version or validated release boundary.
      Evidence: issue:39182.
      Issue triage decision: issue-triage-decision:add:EF97615A0C7AE86138E8FC8E3772BC38FC3F3ED4BD13D829CD77A36C8B35F509
    • add: s/needs-verification - The reported orientation and event failures still need empirical validation; no authorized reproduction outcome appears in the chronology.
      Evidence: issue:39182.
      Issue triage decision: issue-triage-decision:withheld:DBD7FABAAEB967ADD6581EB12F888F456DBE07DA72A96B08F0FFF3A6D28E3245
    • withheld: s/verified - No authorized maintainer or validator has explicitly reproduced the reported behavior.
      Issue triage decision: issue-triage-decision:withheld:1E03B5F2E725EBD7FAF6FAFAF9903C3CE542CDEDA6E7F8F1076B76979BA14510
    • withheld: i/regression - No authorized evidence establishes working behavior in an earlier named MAUI version and failing behavior in a later one.
      Issue triage decision: issue-triage-decision:withheld:2508CBA01F96D7C8BCC8AD03BE0697C4B766CB9FE19CEF335E648F750B1F748A
    • withheld: regressed-in-10.0.110 - The version with the bug does not establish the first bad release; the last working version is unknown.
      Issue triage decision: issue-triage-decision:withheld:437631686F2DAF01B0E8A491D7E93EE5C34B4A8BCD00526EC8CC9659FAFDD5CF
    • withheld: s/triaged - The maintainer command requests triage but does not establish a completed technical review.
      Issue triage decision: issue-triage-decision:withheld:4A27E8E115AFB2EA4C376EC83AC49706A89432B3F41E8472CCF0980AA98B9665
    • withheld: s/needs-repro - The report supplies an event subscription and build steps; an empty reproduction-link field alone does not justify requesting a project.

    Workflow result.

  5. added
    potential-regression
    s/needs-verification
    on Oct 6, 2026
  6. akhilvswoodplc commented on Oct 7, 2026

    @akhilvswoodplc
    Author

    Any update on this?

  7. Ahamed-Ali commented on Oct 8, 2026

    @Ahamed-Ali
    Contributor

    This issue has been validated in Visual Studio Code 1.141.0 with .NET MAUI versions 10.0.0 and 10.0.110. It can be reproduced on the iOS 27 platform.

    Note : In iOS 26.5 , it is working fine.

    On iOS 27 (Issue reproduced) On iOS 26.5(Issue not reproducedd)
    iphone27.0.mov
    iphone26.5.mov

    Issue39182.zip

  8. added
    s/verified
    s/triaged
    and removed
    s/needs-verification
    on Oct 8, 2026
  9. added
    partner/syncfusion
    on Oct 8, 2026
  10. jgold6 commented on Oct 15, 2026

    @jgold6
    Contributor

    I believe the issue may be here:
    https://github.com/dotnet/maui/blob/10.0.110/src/Essentials/src/DeviceDisplay/DeviceDisplay.ios.cs#L166-L168

    	        // On iOS, use status bar orientation changes (deprecated but still works)
    		var notification = UIApplication.DidChangeStatusBarOrientationNotification;
    		observer = notificationCenter.AddObserver(notification, OnMainDisplayInfoChanged);
    

    And also using the status bar orientation to populate the MainDisplayInfo.Orientation property:
    https://github.com/dotnet/maui/blob/10.0.110/src/Essentials/src/DeviceDisplay/DeviceDisplay.ios.cs#L183-L186

    	static DisplayOrientation CalculateOrientation() =>
    		UIApplication.SharedApplication.StatusBarOrientation.IsLandscape()
    			? DisplayOrientation.Landscape
    			: DisplayOrientation.Portrait;
    

    Perhaps this deprecated method no longer works to detect device orientation change?

    Workaround to detect orientation change and current orientation:

    #if __IOS__
        using UIKit;
        using Foundation;
    #endif
    
    #if __IOS__
        var notificationCenter = NSNotificationCenter.DefaultCenter;
        NSObject observer = notificationCenter.AddObserver(UIDevice.OrientationDidChangeNotification, OnOrientationChanged);
    endif
    
    #if __IOS__
    // for landscape
        if ( UIDevice.CurrentDevice.Orientation == UIDeviceOrientation.LandscapeLeft || UIDevice.CurrentDevice.Orientation ==                     UIDeviceOrientation.LandscapeRight) {...}
    // for portrait
        else if (UIDevice.CurrentDevice.Orientation == UIDeviceOrientation.Portrait || UIDevice.CurrentDevice.Orientation ==                     UIDeviceOrientation.PortraitUpsideDown) {...}
    #endif
    

    The values for DeviceDisplay.Current.MainDisplayInfo.Rotation is also always giving the same value, 0, because I suspect it too is using the status bar orientation set the MainDisplayInfo.Rotation of enum type DisplayRotation:
    https://github.com/dotnet/maui/blob/10.0.110/src/Essentials/src/DeviceDisplay/DeviceDisplay.ios.cs#L188-L196

    static DisplayRotation CalculateRotation() =>
        UIApplication.SharedApplication.StatusBarOrientation switch
        {
            UIInterfaceOrientation.Portrait => DisplayRotation.Rotation0,
            UIInterfaceOrientation.PortraitUpsideDown => DisplayRotation.Rotation180,
            UIInterfaceOrientation.LandscapeLeft => DisplayRotation.Rotation270,
            UIInterfaceOrientation.LandscapeRight => DisplayRotation.Rotation90,
            _ => DisplayRotation.Unknown,
        };
    

    but you can use UIDevice.CurrentDevice.Orientation to figure the device rotation yourself.

    EDIT: I just created a PR that should address all of this.

  11. added 2 commits that reference this issue on Oct 20, 2026
    0561bc9
    cbbbe48
  12. kubaflo commented on Oct 25, 2026

    @kubaflo
    Contributor

    Fixed here #39398

  13. added 2 commits that reference this issue on Oct 25, 2026
    11a4ce3
    e438367
  14. added a commit that references this issue on Oct 28, 2026
    1c2aee3
  15. KlaasTroost commented on Nov 2, 2026

    @KlaasTroost

    I installed this fix as a PR build version and tested it on a iPhone DUO simulator and I think it is not yet the way it should be:

    If i turn the device on a closed duo phone it looks oke. When the phone is in portrait mode and then open the phone it should go to landscape mode, but it stays in portrait mode. Because the start state is not correct al the other states are also not correct. I tested just on a simulator.

    Please reopen this issue.

  16. jfversluis commented on Nov 4, 2026

    @jfversluis
    Member

    @KlaasTroost I've opened #39879 targeting .NET 10 with a follow-up fix for the Duo case you reported. Once CI has produced the artifacts, could you try that build and let us know whether opening/folding and rotating now work in your app? The original .NET 11 candidate was checked locally in both scene-enabled and legacy apps; confirmation with your .NET 10 setup would be really helpful.

  17. added a commit that references this issue on Nov 4, 2026
    4d148fd
  18. added this to the .NET 10 SR13 milestone on Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-essentials-devicedisplaypartner/syncfusionplatform/iospotential-regressions/triageds/verifiedt/bugversion/ios-27

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions