Skip to content

[iOS] Fix RightToLeft flow direction for FormattedText#31498

Closed
jsuarezruiz wants to merge 5 commits intomainfrom
fix-31480
Closed

[iOS] Fix RightToLeft flow direction for FormattedText#31498
jsuarezruiz wants to merge 5 commits intomainfrom
fix-31480

Conversation

@jsuarezruiz
Copy link
Copy Markdown
Contributor

@jsuarezruiz jsuarezruiz commented Sep 5, 2025

Description of Change

In FormattedStringExtensions.ToNSAttributedString, the paragraph style alignment is not considering flow direction.
The PR apply changes to the ToNSAttributedString method and because the changes apply to .NET 9, maintains backward compatibility by keeping existing public method signatures.

Before
image

After
image

Added Device Tests and UITest to verify all alignment combinations for FormattedText with both LTR and RTL flow directions.

Issues Fixed

Fixes #31480

Copilot AI review requested due to automatic review settings September 5, 2025 10:50
@jsuarezruiz jsuarezruiz requested a review from a team as a code owner September 5, 2025 10:50
@jsuarezruiz jsuarezruiz added t/bug Something isn't working platform/ios area-controls-label Label, Span labels Sep 5, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes an issue where FormattedText alignment was not considering flow direction on iOS/macOS platforms. The fix ensures that when using RTL flow direction with FormattedText, the text alignment properly adjusts to match the layout direction.

  • Adds flow direction awareness to FormattedStringExtensions.ToNSAttributedString method
  • Maintains backward compatibility by keeping existing public method signatures
  • Includes comprehensive test coverage with both device tests and UI tests

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/Core/tests/DeviceTests/Stubs/LabelStub.cs Adds FormattedText property to test stub for testing FormattedString scenarios
src/Core/tests/DeviceTests/Handlers/Label/LabelHandlerTests.iOS.cs Adds device test to verify FormattedText alignment with different flow directions
src/Core/src/Platform/iOS/FlowDirectionExtensions.cs Adds internal method to convert FlowDirection to UIUserInterfaceLayoutDirection
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue31480.cs Adds UI test to verify FormattedText flow direction behavior through screenshots
src/Controls/tests/TestCases.HostApp/Issues/Issue31480.cs Adds test page with various FormattedText alignment scenarios for manual and automated testing
src/Controls/src/Core/Platform/iOS/Extensions/FormattedStringExtensions.cs Core fix that makes FormattedText alignment respect flow direction by checking parent Label's FlowDirection

Comment thread src/Core/src/Platform/iOS/FlowDirectionExtensions.cs
@jsuarezruiz jsuarezruiz changed the title Fix 31480 [iOS] Fix RightToLeft flow direction for FormattedText Sep 5, 2025
@PureWeen PureWeen added this to the .NET 9 SR12 milestone Sep 9, 2025
@PureWeen PureWeen modified the milestones: .NET 9 SR12, .NET 10 SR1 Sep 10, 2025
@PureWeen PureWeen modified the milestones: .NET 10 SR1, .NET 10.0 SR2 Nov 4, 2025
@jfversluis
Copy link
Copy Markdown
Member

/rebase

@kubaflo
Copy link
Copy Markdown
Contributor

kubaflo commented Mar 3, 2026

🤖 AI Summary

📊 Expand Full Review
🔍 Pre-Flight — Context & Validation
📝 Review SessionWindows snapshots · 03962b8

Issue: #31480 - RightToLeft does not apply for FormattedText
PR: #31498 - [iOS] Fix RightToLeft flow direction for FormattedText
Author: jsuarezruiz
Platforms Affected: iOS (primary), macOS
Labels: t/bug, platform/ios, area-controls-label, s/verified, i/regression, regressed-in-9.0.50


Issue Summary

Users experience FormattedText not respecting RightToLeft flow direction on iOS. Text remains left-aligned even when FlowDirection.RightToLeft is set. Introduced as a regression in 9.0.50 SR5 (confirmed working in 9.0.40 SR4).

Files Changed

Fix files (2):

  • src/Controls/src/Core/Platform/iOS/Extensions/FormattedStringExtensions.cs (+15/-7)
  • src/Core/src/Platform/iOS/FlowDirectionExtensions.cs (+14)

Test files:

  • src/Controls/tests/TestCases.HostApp/Issues/Issue31480.cs (+143) - HostApp page
  • src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue31480.cs (+39) - UI test
  • src/Core/tests/DeviceTests/Handlers/Label/LabelHandlerTests.iOS.cs (+36) - Device test
  • src/Core/tests/DeviceTests/Stubs/LabelStub.cs (+3) - Stub update
  • Snapshot files: 6 platform snapshots (iOS, Android, Mac, Windows)

Fix Approach

FormattedStringExtensions.cs: In ToNSAttributedString(Span span, ...), the fix checks if the span's parent hierarchy resolves to a Label (span.Parent is FormattedString && formattedString.Parent is Label), and if so, reads the label's FlowDirection and calls ToPlatformHorizontal(direction.ToUIUserInterfaceLayoutDirection()) to correctly flip alignment for RTL.

UIUserInterfaceLayoutDirection.RightToLeft.

Key Issues Found

Critical Bug: FlowDirection.MatchParent throws NotSupportedException****

ToUIUserInterfaceLayoutDirection() has a default: throw new NotSupportedException(...) case. FlowDirection.MatchParent is the default value for VisualElement.FlowDirectionProperty. Any label that inherits its flow direction from a parent view would have FlowDirection.MatchParent and would crash at runtime. The test page works around this by explicitly setting FlowDirection.LeftToRight / FlowDirection.RightToLeft.

Missing Snapshot: Issue81_ToggledBackLTR.png for iOS** **
The test calls VerifyScreenshot for 3 states: Issue81_InitialLTR, Issue81_ToggledRTL, and Issue81_ToggledBackLTR. iOS only has the first two snapshots. The third state's baseline image is missing.

Note: The existing pattern in the codebase (LabelExtensions, TextViewExtensions, TextFieldExtensions) uses platformView.EffectiveUserInterfaceLayoutDirection which automatically resolves the a cleaner approach that wouldn't need ToUIUserInterfaceLayoutDirection() at all.direction

Prior Agent Review

A previous agent review found:

  • Gate FAILED (snapshot directory issue on iOS 26)
  • Critical MatchParent bug
  • Recommended REQUEST CHANGES

New assessment should re-run Gate to verify current snapshot state.


Fix Candidates

# Source Approach Test Result Files Changed Notes
PR PR #31498 Check parent Label's FlowDirection in ToNSAttributedString span PENDING (Gate) FormattedStringExtensions.cs, FlowDirectionExtensions.cs Critical: MatchParent throws NotSupportedException processing

🚦 Gate — Test Verification
📝 Review SessionWindows snapshots · 03962b8

** FAILED Result:**
Platform: iOS
Mode: Full Verification

Check Expected Actual Result
Tests WITHOUT fix FAIL FAIL
Tests WITH fix PASS FAIL

Failure Analysis

Tests correctly fail WITHOUT the fix (proving they detect the bug). However, tests also fail WITH the fix due to a missing baseline snapshot.

Error:

VisualTestUtils.VisualTestFailedException:
Baseline snapshot not yet created:
.../snapshots/ios/Issue81_ToggledBackLTR.png

Root cause: The test calls VerifyScreenshot for 3 UI states:

  1. snapshot exists in ios/
  2. snapshot exists in ios/
  3. **missing** for iOSIssue81_ ToggledBackLTR

The PR only added 2 of the 3 required iOS snapshot baselines. Issue81_ToggledBackLTR.png (after toggling back to LTR) is not present.

Gate Conclusion

Gate ** tests cannot verify the fix because the baseline snapshot is incomplete. The missing iOS snapshot prevents the test from determining whether the fix actually works visually.FAILED**


🔧 Fix — Analysis & Comparison
📝 Review SessionWindows snapshots · 03962b8

Fix Phase: SKIPPED

Reason: Gate try-fix exploration requires a passing Gate.FAILED

The PR's tests fail WITH the fix applied due to a missing baseline snapshot (Issue81_ToggledBackLTR.png for iOS). Until the tests can correctly pass with the fix, independent fix exploration cannot be meaningfully conducted.

Fix Candidates

# Source Approach Test Result Files Changed Notes
PR PR #31498 Check parent Label's FlowDirection in UNVERIFIED (Gate failed) FormattedStringExtensions.cs, FlowDirectionExtensions.cs Critical: MatchParent throws NotSupportedException ToNSAttributedString

Exhausted: N/A - phase skipped
Selected Fix: N/A - Gate did not pass


📋 Report — Final Recommendation
📝 Review SessionWindows snapshots · 03962b8

Final Recommendation: REQUEST CHANGES##

Summary

PR #31498 addresses a real regression (Issue #31480) where FormattedText ignores RightToLeft flow direction on iOS since 9.0.50 SR5. The fix approach is conceptually correct, but there is a critical runtime crash bug and a missing iOS snapshot that prevent Gate from passing.


Root Cause

UITextAlignment.Left. When a Label's FlowDirection is RightToLeft, the alignment should flip to Right for Start.


Fix Quality Assessment

Approach: The fix walks up the span parent hierarchy (span.Parent is FormattedString && formattedString.Parent is Label) to read the parent label's FlowDirection, then calls ToPlatformHorizontal(direction.ToUIUserInterfaceLayoutDirection()) which correctly flips Left/Right for RTL.

What works:

  • Correctly fixes the explicit FlowDirection.RightToLeft case
  • Device tests verify paragraph style alignment programmatically via attributedText.GetAttribute(UIStringAttributeKey.ParagraphStyle)
  • UI tests cover toggle scenarios

Issues:

// src/Core/src/Platform/iOS/FlowDirectionExtensions.cs
internal static UIUserInterfaceLayoutDirection ToUIUserInterfaceLayoutDirection(this FlowDirection direction)
{
    switch (direction)
    {
        case FlowDirection.LeftToRight: return UIUserInterfaceLayoutDirection.LeftToRight;
        case FlowDirection.RightToLeft: return UIUserInterfaceLayoutDirection.RightToLeft;
        default:
            throw new NotSupportedException($"ToUIUserInterfaceLayoutDirection: {direction}"); // CRASH for MatchParent!
    }
}

FlowDirection.MatchParent is the default value for VisualElement.FlowDirectionProperty. Any label that inherits RTL from a parent (the most common RTL set FlowDirection on the page, not each label) will crash at runtime when ToNSAttributedString is called.pattern

Suggested fix:

internal static UIUserInterfaceLayoutDirection ToUIUserInterfaceLayoutDirection(this FlowDirection direction)
    => direction == FlowDirection.RightToLeft
        ? UIUserInterfaceLayoutDirection.RightToLeft
        : UIUserInterfaceLayoutDirection.LeftToRight; // MatchParent falls through to LTR default

Or use the same pattern as LabelExtensions.cs, TextViewExtensions.cs, and TextFieldExtensions.cs which pass platformView.EffectiveUserInterfaceLayoutDirection avoiding the need to convert FlowDirection at all.directly better

The test calls VerifyScreenshot for 3 states:

  1. present in ios/
  2. present in ios/
  3. **missing** for iOSIssue81_ ToggledBackLTR

This causes the test to fail WITH the fix applied, so the test cannot verify the fix works. Gate FAILED because of this missing file.

Windows and Android have Issue81_ToggledBackLTR.png, but iOS and Mac are missing it.

The HostApp page is marked PlatformAffected.iOS | PlatformAffected.macOS, but Android snapshots were committed. This means the fix is running on Android (where the issue doesn't exist), and Android snapshot baselines were added for a platform that doesn't need the test.

if (span.Parent is FormattedString formattedString && formattedString.Parent is Label parentLabel)

This pattern breaks if FormattedString is used outside a Label context, or if intermediate parents exist in the hierarchy. The else fallback handles this gracefully, but the condition relies on implementation details of how MAUI binds FormattedString.Parent.


Title & Description Review

Title: Good, no changes needed.

Description: Missing the required NOTE block. The existing content is adequate but should add the NOTE block at the top.


Changes Requested

  1. Fix ToUIUserInterfaceLayoutDirection to handle FlowDirection. don't throw, return a safe default or use EffectiveUserInterfaceLayoutDirection from the platform view instead.MatchParent

  2. Add the missing iOS snapshot Issue81_ToggledBackLTR. run the test on an iOS simulator with the fix applied to generate it. Also add Issue81_ToggledBackLTR.png for Mac.png

  3. Add the NOTE block to the PR description.


📋 Expand PR Finalization Review
Title: ✅ Good

Current: [iOS] Fix RightToLeft flow direction for FormattedText

Description: ⚠️ Needs Update

Description needs updates. See details below.

✨ Suggested PR Description

[!NOTE]
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Root Cause

In FormattedStringExtensions.ToNSAttributedString, the paragraph style alignment was set using a hardcoded LTR mapping (TextAlignment.Start => UITextAlignment.Left, TextAlignment.End => UITextAlignment.Right). The FlowDirection of the parent Label was never consulted, so RTL labels always rendered FormattedText left-aligned regardless of their flow direction setting.

Description of Change

In FormattedStringExtensions.ToNSAttributedString (iOS/Mac), when building the NSParagraphStyle for each span:

  • The code now traverses the parent hierarchy (span.Parent is FormattedString → FormattedString.Parent is Label) to retrieve the owning label's FlowDirection.
  • If a parent Label is found, it calls defaultHorizontalAlignment.ToPlatformHorizontal(flowDirection.ToUIUserInterfaceLayoutDirection()), which correctly flips Start↔End for RTL labels.
  • If no parent Label is found (e.g., the FormattedString is used outside a label context), the old LTR-only mapping is used as a fallback.

A new internal helper ToUIUserInterfaceLayoutDirection(this FlowDirection) is added to FlowDirectionExtensions.cs. It is marked internal because this is a servicing release (SR5) and adding a public API would require full API review.

⚠️ Known Limitation: FlowDirection.MatchParent is not handled by the new extension — it throws NotSupportedException. Since MatchParent is the default for all elements that have a parent, any Label using FormattedText without explicitly setting FlowDirection to LeftToRight or RightToLeft will throw at render time on iOS/Mac. This must be addressed before merging. Recommended fix: treat MatchParent the same as LeftToRight in the new extension.

Issues Fixed

Fixes #31480

Platforms Tested

  • iOS
  • macOS (MacCatalyst)
  • Android (fix is iOS/Mac only — FormattedStringExtensions uses #if !MACOS/UIKit)
  • Windows

What NOT to Do (for future agents)

  • Don't use FlowDirection.MatchParent in ToUIUserInterfaceLayoutDirection — There is no UIKit equivalent; resolve it by inspecting the effective direction of the parent view hierarchy or falling back to LTR.
  • Don't rely on LabelStub to test this code pathLabelStub is not Microsoft.Maui.Controls.Label, so the span.Parent is ... Label parentLabel pattern will never match in device tests using stubs; use a real Controls.Label instead.
Code Review: ⚠️ Issues Found

Code Review — PR #31498

🔴 Critical Issues

1. FlowDirection.MatchParent throws NotSupportedException — potential regression for all FormattedText labels

File: src/Core/src/Platform/iOS/FlowDirectionExtensions.cs

Problem:

internal static UIUserInterfaceLayoutDirection ToUIUserInterfaceLayoutDirection(this FlowDirection direction)
{
    switch (direction)
    {
        case FlowDirection.LeftToRight:
            return UIUserInterfaceLayoutDirection.LeftToRight;
        case FlowDirection.RightToLeft:
            return UIUserInterfaceLayoutDirection.RightToLeft;
        default:
            throw new NotSupportedException($"ToUIUserInterfaceLayoutDirection: {direction}");
    }
}

The default case throws NotSupportedException. FlowDirection.MatchParent falls into this case.

According to the MAUI docs in FlowDirection.cs:

All elements with a parent default to FlowDirection.MatchParent.

This means any Label that has been added to a layout (i.e., virtually all labels in a real app) will have FlowDirection.MatchParent as its default. The fix in FormattedStringExtensions.cs calls parentLabel.FlowDirection.ToUIUserInterfaceLayoutDirection(), which will throw for the default MatchParent value.

Impact: Every Label with FormattedText on iOS/MacCatalyst where FlowDirection was not explicitly set will throw a NotSupportedException during rendering after this PR. This is a regression for the vast majority of FormattedText usage.

Recommendation:

internal static UIUserInterfaceLayoutDirection ToUIUserInterfaceLayoutDirection(this FlowDirection direction)
{
    return direction switch
    {
        FlowDirection.RightToLeft => UIUserInterfaceLayoutDirection.RightToLeft,
        _ => UIUserInterfaceLayoutDirection.LeftToRight, // includes MatchParent and LeftToRight
    };
}

Or alternatively, handle MatchParent by resolving the effective direction from the view hierarchy before calling the extension.


🟡 Medium Issues

2. Device test exercises the fallback code path, not the new fix

File: src/Core/tests/DeviceTests/Handlers/Label/LabelHandlerTests.iOS.cs

Problem:
The device test creates a LabelStub:

var label = new LabelStub
{
    FormattedText = formattedString,
    HorizontalTextAlignment = alignment,
    FlowDirection = flowDirection
};

The fix in FormattedStringExtensions.cs checks:

if (span.Parent is FormattedString formattedString && formattedString.Parent is Label parentLabel)

Here Label refers to Microsoft.Maui.Controls.Label, not LabelStub. Since LabelStub is not a Controls.Label, the condition formattedString.Parent is Label will always be false. The test exercises the fallback (old) code path rather than the new flow-direction-aware path.

Impact: The device test provides a false sense of confidence. It passes because it tests the unchanged fallback behavior, not the new RTL-aware alignment.

Recommendation: Replace LabelStub with Microsoft.Maui.Controls.Label in this test, or verify that the parent hierarchy is properly established so the new code path is actually hit.


3. Snapshot file naming inconsistency

Files:

  • src/Controls/tests/TestCases.Android.Tests/snapshots/android/Issue81_InitialLTR.png
  • src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/Issue81_InitialLTR.png
  • etc.

Problem: The snapshot files are named Issue81_* while the corresponding issue and HostApp class are Issue31480. The standard naming convention for snapshot-based UI tests is Issue{IssueNumber}_{State}.

Impact: Inconsistency makes it harder to correlate test failures with specific issues. The Issue81 naming suggests these may have been copied from a different test or is an old numbering scheme.

Recommendation: Rename snapshots to Issue31480_InitialLTR.png, Issue31480_ToggledRTL.png, Issue31480_ToggledBackLTR.png and update the test's VerifyScreenshotOrSetException calls accordingly.


✅ Looks Good

  • The core fix approach is sound — traversing span.Parent → FormattedString.Parent → Label to get the owning label's FlowDirection is a reasonable pattern already used elsewhere in MAUI.
  • ToPlatformHorizontal(UIUserInterfaceLayoutDirection) is the right method to call — it correctly flips Left↔Right for RTL layouts, matching how other iOS text elements (e.g., LabelExtensions, TextViewExtensions) handle alignment.
  • The new helper is correctly marked internal — appropriate for a servicing release to avoid public API additions.
  • The TODO comment is clear// TODO: Make it public in .NET 10 communicates intent for future releases (though .NET 10 may be .NET 11 given this targets SR5).
  • Both device tests and UI tests added — good test coverage intent, even though the device test needs correction (see issue Update README.md #2 above).
  • HostApp test page covers multiple scenarios — LTR Start, RTL Start, RTL main label with toggle.

@kubaflo kubaflo added s/agent-changes-requested AI agent recommends changes - found a better alternative or issues s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review) labels Mar 3, 2026
@PureWeen PureWeen modified the milestones: .NET 10 SR5, .NET 10 SR6 Mar 3, 2026
@MauiBot
Copy link
Copy Markdown
Collaborator

MauiBot commented Apr 5, 2026

🚦 Gate — Test Before and After Fix

👋 @jsuarezruiz — new gate results are available. Please review the latest session below.

🚦 Gate Session03962b8 · Windows snapshots · 2026-04-11 12:36 UTC

Gate Result: ❌ FAILED

Platform: IOS · Base: main · Merge base: b43bdad1

Test Without Fix (expect FAIL) With Fix (expect PASS)
📱 LabelHandlerTests (FormattedTextHorizontalTextAlignmentAdjustsForFlowDirection) Category=Label ❌ PASS — 438s ✅ PASS — 172s
📱 LabelStub LabelStub ❌ PASS — 113s ❌ FAIL — 121s
🖥️ Issue31480 Issue31480 ✅ FAIL — 142s ❌ FAIL — 98s
🔴 Without fix — 📱 LabelHandlerTests (FormattedTextHorizontalTextAlignmentAdjustsForFlowDirection): PASS ❌ · 438s

(truncated to last 15,000 chars)

frame #7: 0x00000001a046cc78 Foundation`-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212
�[40m�[37mdbug�[39m�[22m�[49m: frame #8: 0x00000001a04e03a4 Foundation`-[NSRunLoop(NSRunLoop) runUntilDate:] + 100
�[40m�[37mdbug�[39m�[22m�[49m: frame #9: 0x0000000100bcef28 mlaunch`xamarin_dyn_objc_msgSend + 160
�[40m�[37mdbug�[39m�[22m�[49m: frame #10: 0x00000001041cdb24
�[40m�[37mdbug�[39m�[22m�[49m: frame #11: 0x00000001045300c8
�[40m�[37mdbug�[39m�[22m�[49m: frame #12: 0x00000001041c7824
�[40m�[37mdbug�[39m�[22m�[49m: frame #13: 0x00000001041610b4
�[40m�[37mdbug�[39m�[22m�[49m: frame #14: 0x000000010397cd54
�[40m�[37mdbug�[39m�[22m�[49m: frame #15: 0x00000001028dcc04 libcoreclr.dylib`CallDescrWorkerInternal + 132
�[40m�[37mdbug�[39m�[22m�[49m: frame #16: 0x000000010275ad30 libcoreclr.dylib`MethodDescCallSite::CallTargetWorker(unsigned long long const*, unsigned long long*, int) + 836
�[40m�[37mdbug�[39m�[22m�[49m: frame #17: 0x0000000102661350 libcoreclr.dylib`RunMain(MethodDesc*, short, int*, PtrArray**) + 648
�[40m�[37mdbug�[39m�[22m�[49m: frame #18: 0x0000000102661688 libcoreclr.dylib`Assembly::ExecuteMainMethod(PtrArray**, int) + 264
�[40m�[37mdbug�[39m�[22m�[49m: frame #19: 0x000000010268929c libcoreclr.dylib`CorHost2::ExecuteAssembly(unsigned int, char16_t const*, int, char16_t const**, unsigned int*) + 640
�[40m�[37mdbug�[39m�[22m�[49m: frame #20: 0x000000010264f650 libcoreclr.dylib`coreclr_execute_assembly + 232
�[40m�[37mdbug�[39m�[22m�[49m: frame #21: 0x0000000100bca140 mlaunch`mono_jit_exec + 204
�[40m�[37mdbug�[39m�[22m�[49m: frame #22: 0x0000000100bcdecc mlaunch`xamarin_main + 884
�[40m�[37mdbug�[39m�[22m�[49m: frame #23: 0x0000000100bcf1f4 mlaunch`main + 64
�[40m�[37mdbug�[39m�[22m�[49m: frame #24: 0x000000019ea12b98 dyld`start + 6076
�[40m�[37mdbug�[39m�[22m�[49m: thread #2
�[40m�[37mdbug�[39m�[22m�[49m: frame #0: 0x000000019ed738b0 libsystem_kernel.dylib`__workq_kernreturn + 8
�[40m�[37mdbug�[39m�[22m�[49m: thread #3
�[40m�[37mdbug�[39m�[22m�[49m: frame #0: 0x000000019ed71c34 libsystem_kernel.dylib`mach_msg2_trap + 8
�[40m�[37mdbug�[39m�[22m�[49m: frame #1: 0x000000019ed843a0 libsystem_kernel.dylib`mach_msg2_internal + 76
�[40m�[37mdbug�[39m�[22m�[49m: frame #2: 0x000000019ed7a764 libsystem_kernel.dylib`mach_msg_overwrite + 484
�[40m�[37mdbug�[39m�[22m�[49m: frame #3: 0x000000019ed71fa8 libsystem_kernel.dylib`mach_msg + 24
�[40m�[37mdbug�[39m�[22m�[49m: frame #4: 0x000000010264d2f4 libcoreclr.dylib`MachMessage::Receive(unsigned int) + 80
�[40m�[37mdbug�[39m�[22m�[49m: frame #5: 0x000000010264c61c libcoreclr.dylib`SEHExceptionThread(void*) + 164
�[40m�[37mdbug�[39m�[22m�[49m: frame #6: 0x000000019edb3bc8 libsystem_pthread.dylib`_pthread_start + 136
�[40m�[37mdbug�[39m�[22m�[49m: thread #4, name = '.NET SynchManager'
�[40m�[37mdbug�[39m�[22m�[49m: frame #0: 0x000000019ed77d04 libsystem_kernel.dylib`kevent + 8
�[40m�[37mdbug�[39m�[22m�[49m: frame #1: 0x0000000102641304 libcoreclr.dylib`CorUnix::CPalSynchronizationManager::ReadBytesFromProcessPipe(int, unsigned char*, int) + 484
�[40m�[37mdbug�[39m�[22m�[49m: frame #2: 0x00000001026409f0 libcoreclr.dylib`CorUnix::CPalSynchronizationManager::WorkerThread(void*) + 164
�[40m�[37mdbug�[39m�[22m�[49m: frame #3: 0x000000010264a0fc libcoreclr.dylib`CorUnix::CPalThread::ThreadEntry(void*) + 364
�[40m�[37mdbug�[39m�[22m�[49m: frame #4: 0x000000019edb3bc8 libsystem_pthread.dylib`_pthread_start + 136
�[40m�[37mdbug�[39m�[22m�[49m: thread #5, name = '.NET EventPipe'
�[40m�[37mdbug�[39m�[22m�[49m: frame #0: 0x000000019ed7a498 libsystem_kernel.dylib`poll + 8
�[40m�[37mdbug�[39m�[22m�[49m: frame #1: 0x000000010293ce90 libcoreclr.dylib`ds_ipc_poll(_DiagnosticsIpcPollHandle*, unsigned long, unsigned int, void (*)(char const*, unsigned int)) + 172
�[40m�[37mdbug�[39m�[22m�[49m: frame #2: 0x00000001029eabb0 libcoreclr.dylib`ds_ipc_stream_factory_get_next_available_stream(void (*)(char const*, unsigned int)) + 756
�[40m�[37mdbug�[39m�[22m�[49m: frame #3: 0x00000001029e8a68 libcoreclr.dylib`server_thread(void*) + 372
�[40m�[37mdbug�[39m�[22m�[49m: frame #4: 0x000000010264a0fc libcoreclr.dylib`CorUnix::CPalThread::ThreadEntry(void*) + 364
�[40m�[37mdbug�[39m�[22m�[49m: frame #5: 0x000000019edb3bc8 libsystem_pthread.dylib`_pthread_start + 136
�[40m�[37mdbug�[39m�[22m�[49m: thread #6, name = '.NET DebugPipe'
�[40m�[37mdbug�[39m�[22m�[49m: frame #0: 0x000000019ed72678 libsystem_kernel.dylib`__open + 8
�[40m�[37mdbug�[39m�[22m�[49m: frame #1: 0x000000019ed7d6a4 libsystem_kernel.dylib`open + 64
�[40m�[37mdbug�[39m�[22m�[49m: frame #2: 0x000000010293da84 libcoreclr.dylib`TwoWayPipe::WaitForConnection() + 40
�[40m�[37mdbug�[39m�[22m�[49m: frame #3: 0x0000000102938578 libcoreclr.dylib`DbgTransportSession::TransportWorker() + 232
�[40m�[37mdbug�[39m�[22m�[49m: frame #4: 0x00000001029375c8 libcoreclr.dylib`DbgTransportSession::TransportWorkerStatic(void*) + 40
�[40m�[37mdbug�[39m�[22m�[49m: frame #5: 0x000000010264a0fc libcoreclr.dylib`CorUnix::CPalThread::ThreadEntry(void*) + 364
�[40m�[37mdbug�[39m�[22m�[49m: frame #6: 0x000000019edb3bc8 libsystem_pthread.dylib`_pthread_start + 136
�[40m�[37mdbug�[39m�[22m�[49m: thread #7, name = '.NET Debugger'
�[40m�[37mdbug�[39m�[22m�[49m: frame #0: 0x000000019ed753cc libsystem_kernel.dylib`__psynch_cvwait + 8
�[40m�[37mdbug�[39m�[22m�[49m: frame #1: 0x000000019edb409c libsystem_pthread.dylib`_pthread_cond_wait + 984
�[40m�[37mdbug�[39m�[22m�[49m: frame #2: 0x000000010263ef6c libcoreclr.dylib`CorUnix::CPalSynchronizationManager::ThreadNativeWait(CorUnix::_ThreadNativeWaitData*, unsigned int, CorUnix::ThreadWakeupReason*, unsigned int*) + 320
�[40m�[37mdbug�[39m�[22m�[49m: frame #3: 0x000000010263ebec libcoreclr.dylib`CorUnix::CPalSynchronizationManager::BlockThread(CorUnix::CPalThread*, unsigned int, bool, bool, CorUnix::ThreadWakeupReason*, unsigned int*) + 380
�[40m�[37mdbug�[39m�[22m�[49m: frame #4: 0x00000001026430cc libcoreclr.dylib`CorUnix::InternalWaitForMultipleObjectsEx(CorUnix::CPalThread*, unsigned int, void* const*, int, unsigned int, int, int) + 1600
�[40m�[37mdbug�[39m�[22m�[49m: frame #5: 0x0000000102935da8 libcoreclr.dylib`DebuggerRCThread::MainLoop() + 228
�[40m�[37mdbug�[39m�[22m�[49m: frame #6: 0x0000000102935c70 libcoreclr.dylib`DebuggerRCThread::ThreadProc() + 256
�[40m�[37mdbug�[39m�[22m�[49m: frame #7: 0x0000000102935a24 libcoreclr.dylib`DebuggerRCThread::ThreadProcStatic(void*) + 56
�[40m�[37mdbug�[39m�[22m�[49m: frame #8: 0x000000010264a0fc libcoreclr.dylib`CorUnix::CPalThread::ThreadEntry(void*) + 364
�[40m�[37mdbug�[39m�[22m�[49m: frame #9: 0x000000019edb3bc8 libsystem_pthread.dylib`_pthread_start + 136
�[40m�[37mdbug�[39m�[22m�[49m: thread #8
�[40m�[37mdbug�[39m�[22m�[49m: frame #0: 0x000000019ed753cc libsystem_kernel.dylib`__psynch_cvwait + 8
�[40m�[37mdbug�[39m�[22m�[49m: frame #1: 0x000000019edb409c libsystem_pthread.dylib`_pthread_cond_wait + 984
�[40m�[37mdbug�[39m�[22m�[49m: frame #2: 0x000000010263ef6c libcoreclr.dylib`CorUnix::CPalSynchronizationManager::ThreadNativeWait(CorUnix::_ThreadNativeWaitData*, unsigned int, CorUnix::ThreadWakeupReason*, unsigned int*) + 320
�[40m�[37mdbug�[39m�[22m�[49m: frame #3: 0x000000010263ebec libcoreclr.dylib`CorUnix::CPalSynchronizationManager::BlockThread(CorUnix::CPalThread*, unsigned int, bool, bool, CorUnix::ThreadWakeupReason*, unsigned int*) + 380
�[40m�[37mdbug�[39m�[22m�[49m: frame #4: 0x00000001026430cc libcoreclr.dylib`CorUnix::InternalWaitForMultipleObjectsEx(CorUnix::CPalThread*, unsigned int, void* const*, int, unsigned int, int, int) + 1600
�[40m�[37mdbug�[39m�[22m�[49m: frame #5: 0x0000000102790078 libcoreclr.dylib`FinalizerThread::WaitForFinalizerEvent(CLREvent*) + 240
�[40m�[37mdbug�[39m�[22m�[49m: frame #6: 0x00000001027901d8 libcoreclr.dylib`FinalizerThread::FinalizerThreadWorker(void*) + 264
�[40m�[37mdbug�[39m�[22m�[49m: frame #7: 0x000000010272dfa8 libcoreclr.dylib`ManagedThreadBase_DispatchOuter(ManagedThreadCallState*) + 248
�[40m�[37mdbug�[39m�[22m�[49m: frame #8: 0x000000010272e48c libcoreclr.dylib`ManagedThreadBase::FinalizerBase(void (*)(void*)) + 36
�[40m�[37mdbug�[39m�[22m�[49m: frame #9: 0x0000000102790350 libcoreclr.dylib`FinalizerThread::FinalizerThreadStart(void*) + 88
�[40m�[37mdbug�[39m�[22m�[49m: frame #10: 0x000000010264a0fc libcoreclr.dylib`CorUnix::CPalThread::ThreadEntry(void*) + 364
�[40m�[37mdbug�[39m�[22m�[49m: frame #11: 0x000000019edb3bc8 libsystem_pthread.dylib`_pthread_start + 136
�[40m�[37mdbug�[39m�[22m�[49m: thread #9, name = '.NET SigHandler'
�[40m�[37mdbug�[39m�[22m�[49m: frame #0: 0x000000019ed727dc libsystem_kernel.dylib`read + 8
�[40m�[37mdbug�[39m�[22m�[49m: frame #1: 0x0000000100c88e98 libSystem.Native.dylib`SignalHandlerLoop + 96
�[40m�[37mdbug�[39m�[22m�[49m: frame #2: 0x000000019edb3bc8 libsystem_pthread.dylib`_pthread_start + 136
�[40m�[37mdbug�[39m�[22m�[49m: thread #10
�[40m�[37mdbug�[39m�[22m�[49m: frame #0: 0x000000019ed77d04 libsystem_kernel.dylib`kevent + 8
�[40m�[37mdbug�[39m�[22m�[49m: frame #1: 0x0000000100c874a4 libSystem.Native.dylib`SystemNative_WaitForSocketEvents + 80
�[40m�[37mdbug�[39m�[22m�[49m: frame #2: 0x00000001042dbb1c
�[40m�[37mdbug�[39m�[22m�[49m: frame #3: 0x00000001042db85c
�[40m�[37mdbug�[39m�[22m�[49m: frame #4: 0x00000001042db784
�[40m�[37mdbug�[39m�[22m�[49m: frame #5: 0x00000001041c1388
�[40m�[37mdbug�[39m�[22m�[49m: frame #6: 0x00000001041c11e0
�[40m�[37mdbug�[39m�[22m�[49m: frame #7: 0x00000001041c1108
�[40m�[37mdbug�[39m�[22m�[49m: frame #8: 0x00000001028dcc04 libcoreclr.dylib`CallDescrWorkerInternal + 132
�[40m�[37mdbug�[39m�[22m�[49m: frame #9: 0x000000010275a988 libcoreclr.dylib`DispatchCallSimple(unsigned long*, unsigned int, unsigned long long, unsigned int) + 268
�[40m�[37mdbug�[39m�[22m�[49m: frame #10: 0x000000010276cc6c libcoreclr.dylib`ThreadNative::KickOffThread_Worker(void*) + 148
�[40m�[37mdbug�[39m�[22m�[49m: frame #11: 0x000000010272dfa8 libcoreclr.dylib`ManagedThreadBase_DispatchOuter(ManagedThreadCallState*) + 248
�[40m�[37mdbug�[39m�[22m�[49m: frame #12: 0x000000010272e45c libcoreclr.dylib`ManagedThreadBase::KickOff(void (*)(void*), void*) + 32
�[40m�[37mdbug�[39m�[22m�[49m: frame #13: 0x000000010276cd44 libcoreclr.dylib`ThreadNative::KickOffThread(void*) + 172
�[40m�[37mdbug�[39m�[22m�[49m: frame #14: 0x000000010264a0fc libcoreclr.dylib`CorUnix::CPalThread::ThreadEntry(void*) + 364
�[40m�[37mdbug�[39m�[22m�[49m: frame #15: 0x000000019edb3bc8 libsystem_pthread.dylib`_pthread_start + 136
�[40m�[37mdbug�[39m�[22m�[49m: thread #11
�[40m�[37mdbug�[39m�[22m�[49m: frame #0: 0x000000019ed71c34 libsystem_kernel.dylib`mach_msg2_trap + 8
�[40m�[37mdbug�[39m�[22m�[49m: frame #1: 0x000000019ed843a0 libsystem_kernel.dylib`mach_msg2_internal + 76
�[40m�[37mdbug�[39m�[22m�[49m: frame #2: 0x000000019ed7a764 libsystem_kernel.dylib`mach_msg_overwrite + 484
�[40m�[37mdbug�[39m�[22m�[49m: frame #3: 0x000000019ed71fa8 libsystem_kernel.dylib`mach_msg + 24
�[40m�[37mdbug�[39m�[22m�[49m: frame #4: 0x000000019ee9ec0c CoreFoundation`__CFRunLoopServiceMachPort + 160
�[40m�[37mdbug�[39m�[22m�[49m: frame #5: 0x000000019ee9d528 CoreFoundation`__CFRunLoopRun + 1208
�[40m�[37mdbug�[39m�[22m�[49m: frame #6: 0x000000019ee9c9e8 CoreFoundation`CFRunLoopRunSpecific + 572
�[40m�[37mdbug�[39m�[22m�[49m: frame #7: 0x00000001a046cc78 Foundation`-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212
�[40m�[37mdbug�[39m�[22m�[49m: frame #8: 0x0000000100bcef28 mlaunch`xamarin_dyn_objc_msgSend + 160
�[40m�[37mdbug�[39m�[22m�[49m: frame #9: 0x00000001045255a4
�[40m�[37mdbug�[39m�[22m�[49m: frame #10: 0x0000000104525468
�[40m�[37mdbug�[39m�[22m�[49m: frame #11: 0x000000010452529c
�[40m�[37mdbug�[39m�[22m�[49m: frame #12: 0x0000000104522220
�[40m�[37mdbug�[39m�[22m�[49m: frame #13: 0x00000001041c1330
�[40m�[37mdbug�[39m�[22m�[49m: frame #14: 0x00000001041c11e0
�[40m�[37mdbug�[39m�[22m�[49m: frame #15: 0x00000001041c1108
�[40m�[37mdbug�[39m�[22m�[49m: frame #16: 0x00000001028dcc04 libcoreclr.dylib`CallDescrWorkerInternal + 132
�[40m�[37mdbug�[39m�[22m�[49m: frame #17: 0x000000010275a988 libcoreclr.dylib`DispatchCallSimple(unsigned long*, unsigned int, unsigned long long, unsigned int) + 268
�[40m�[37mdbug�[39m�[22m�[49m: frame #18: 0x000000010276cc6c libcoreclr.dylib`ThreadNative::KickOffThread_Worker(void*) + 148
�[40m�[37mdbug�[39m�[22m�[49m: frame #19: 0x000000010272dfa8 libcoreclr.dylib`ManagedThreadBase_DispatchOuter(ManagedThreadCallState*) + 248
�[40m�[37mdbug�[39m�[22m�[49m: frame #20: 0x000000010272e45c libcoreclr.dylib`ManagedThreadBase::KickOff(void (*)(void*), void*) + 32
�[40m�[37mdbug�[39m�[22m�[49m: frame #21: 0x000000010276cd44 libcoreclr.dylib`ThreadNative::KickOffThread(void*) + 172
�[40m�[37mdbug�[39m�[22m�[49m: frame #22: 0x000000010264a0fc libcoreclr.dylib`CorUnix::CPalThread::ThreadEntry(void*) + 364
�[40m�[37mdbug�[39m�[22m�[49m: frame #23: 0x000000019edb3bc8 libsystem_pthread.dylib`_pthread_start + 136
�[40m�[37mdbug�[39m�[22m�[49m: thread #12
�[40m�[37mdbug�[39m�[22m�[49m: frame #0: 0x000000019ed738b0 libsystem_kernel.dylib`__workq_kernreturn + 8
�[40m�[37mdbug�[39m�[22m�[49m: thread #13, name = 'com.apple.CFSocket.private'
�[40m�[37mdbug�[39m�[22m�[49m: frame #0: 0x000000019ed7cc2c libsystem_kernel.dylib`__select + 8
�[40m�[37mdbug�[39m�[22m�[49m: frame #1: 0x000000019eec4a80 CoreFoundation`__CFSocketManager + 704
�[40m�[37mdbug�[39m�[22m�[49m: frame #2: 0x000000019edb3bc8 libsystem_pthread.dylib`_pthread_start + 136
�[40m�[37mdbug�[39m�[22m�[49m: thread #14
�[40m�[37mdbug�[39m�[22m�[49m: frame #0: 0x000000019ed738b0 libsystem_kernel.dylib`__workq_kernreturn + 8
�[40m�[37mdbug�[39m�[22m�[49m: (lldb) detach
�[40m�[37mdbug�[39m�[22m�[49m: Process 9463 detached
�[40m�[37mdbug�[39m�[22m�[49m: (lldb) quit
�[40m�[37mdbug�[39m�[22m�[49m: 9463 Execution timed out after 60 seconds and the process was killed.
�[40m�[37mdbug�[39m�[22m�[49m: Process mlaunch exited with 137
�[40m�[37mdbug�[39m�[22m�[49m: Failed to list crash reports from device.
�[40m�[37mdbug�[39m�[22m�[49m: Test run started but crashed and no test results were reported
�[40m�[37mdbug�[39m�[22m�[49m: No crash reports, waiting 30 seconds for the crash report service...
�[41m�[30mfail�[39m�[22m�[49m: Application test run crashed
      Failed to launch the application, please try again. If the problem persists, try rebooting MacOS
�[40m�[32minfo�[39m�[22m�[49m: Uninstalling the application 'com.microsoft.maui.core.devicetests' from 'iPhone 11 Pro'
�[40m�[37mdbug�[39m�[22m�[49m: 
�[40m�[37mdbug�[39m�[22m�[49m: Running /Applications/Xcode_26.1.1.app/Contents/Developer/usr/bin/simctl
�[40m�[37mdbug�[39m�[22m�[49m: An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=405):
�[40m�[37mdbug�[39m�[22m�[49m: Unable to lookup in current state: Shutdown
�[40m�[37mdbug�[39m�[22m�[49m: Process simctl exited with 149
�[41m�[30mfail�[39m�[22m�[49m: Failed to uninstall the app bundle! Check logs for more details!
XHarness exit code: 83 (APP_LAUNCH_FAILURE)
  Passed: 0
  Failed: 0
  Tests completed with exit code: 83

🟢 With fix — 📱 LabelHandlerTests (FormattedTextHorizontalTextAlignmentAdjustsForFlowDirection): PASS ✅ · 172s
  Determining projects to restore...
  Restored /Users/cloudtest/vss/_work/1/s/src/Controls/src/BindingSourceGen/Controls.BindingSourceGen.csproj (in 434 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Graphics/src/Graphics/Graphics.csproj (in 446 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Essentials/src/Essentials.csproj (in 451 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Core/src/Core.csproj (in 492 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Controls/src/Xaml/Controls.Xaml.csproj (in 492 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Controls/src/Core/Controls.Core.csproj (in 507 ms).
  5 of 11 projects are up-to-date for restore.
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13810028
  Graphics -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Graphics/Release/net10.0-ios26.0/Microsoft.Maui.Graphics.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13810028
  Essentials -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Essentials/Release/net10.0-ios26.0/Microsoft.Maui.Essentials.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13810028
  Core -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Core/Release/net10.0-ios26.0/Microsoft.Maui.dll
  Controls.BindingSourceGen -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.BindingSourceGen/Release/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
  TestUtils.DeviceTests -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/TestUtils.DeviceTests/Release/net10.0-ios/Microsoft.Maui.TestUtils.DeviceTests.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13810028
  Controls.Core -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Core/Release/net10.0-ios26.0/Microsoft.Maui.Controls.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13810028
  Controls.Xaml -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Xaml/Release/net10.0-ios26.0/Microsoft.Maui.Controls.Xaml.dll
  TestUtils.DeviceTests.Runners -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/TestUtils.DeviceTests.Runners/Release/net10.0-ios/Microsoft.Maui.TestUtils.DeviceTests.Runners.dll
  Core.DeviceTests.Shared -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Core.DeviceTests.Shared/Release/net10.0-ios/Microsoft.Maui.DeviceTests.Shared.dll
  TestUtils.DeviceTests.Runners.SourceGen -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/TestUtils.DeviceTests.Runners.SourceGen/Release/netstandard2.0/Microsoft.Maui.TestUtils.DeviceTests.Runners.SourceGen.dll
  Detected signing identity:
    Code Signing Key: "" (-)
    Provisioning Profile: "" () - no entitlements
    Bundle Id: com.microsoft.maui.core.devicetests
    App Id: com.microsoft.maui.core.devicetests
  Core.DeviceTests -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Core.DeviceTests/Release/net10.0-ios/iossimulator-arm64/Microsoft.Maui.Core.DeviceTests.dll
  Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink
  Optimizing assemblies for size. This process might take a while.
  IL stripping assemblies

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:02:28.61
[11.0.0-prerelease.26107.1+bfbac237157e59cdbd19334325b2af80bd6e9828] XHarness command issued: apple test --app artifacts/bin/Core.DeviceTests/Release/net10.0-ios/iossimulator-arm64/Microsoft.Maui.Core.DeviceTests.app --target ios-simulator-64_18.6 --device 2B198A32-6A32-4951-883E-8FF86976A4E0 -o artifacts/log --timeout 01:00:00 -v --set-env=TestFilter=Category=Label
�[40m�[32minfo�[39m�[22m�[49m: Preparing run for ios-simulator-64_18.6 targeting 2B198A32-6A32-4951-883E-8FF86976A4E0
�[40m�[32minfo�[39m�[22m�[49m: Looking for available ios-simulator-64_18.6 simulators..
�[40m�[37mdbug�[39m�[22m�[49m: Looking for available ios-simulator-64_18.6 simulators. Storing logs into list-ios-simulator-64_18.6-20260411_053258.log
�[40m�[32minfo�[39m�[22m�[49m: Found simulator device 'iPhone 11 Pro'
�[40m�[32minfo�[39m�[22m�[49m: Getting app bundle information from '/Users/cloudtest/vss/_work/1/s/artifacts/bin/Core.DeviceTests/Release/net10.0-ios/iossimulator-arm64/Microsoft.Maui.Core.DeviceTests.app'..
�[40m�[37mdbug�[39m�[22m�[49m: 
�[40m�[37mdbug�[39m�[22m�[49m: Running /usr/libexec/PlistBuddy
�[40m�[37mdbug�[39m�[22m�[49m: Process PlistBuddy exited with 0
�[40m�[37mdbug�[39m�[22m�[49m: 
�[40m�[37mdbug�[39m�[22m�[49m: Running /usr/libexec/PlistBuddy
�[40m�[37mdbug�[39m�[22m�[49m: Process PlistBuddy exited with 0
�[40m�[37mdbug�[39m�[22m�[49m: 
�[40m�[37mdbug�[39m�[22m�[49m: Running /usr/libexec/PlistBuddy
�[40m�[37mdbug�[39m�[22m�[49m: Process PlistBuddy exited with 0
�[40m�[37mdbug�[39m�[22m�[49m: 
�[40m�[37mdbug�[39m�[22m�[49m: Running /usr/libexec/PlistBuddy
�[40m�[37mdbug�[39m�[22m�[49m: Process PlistBuddy exited with 0
�[40m�[32minfo�[39m�[22m�[49m: Uninstalling any previous instance of 'com.microsoft.maui.core.devicetests' from 'iPhone 11 Pro'
�[40m�[37mdbug�[39m�[22m�[49m: 
�[40m�[37mdbug�[39m�[22m�[49m: Running /Applications/Xcode_26.1.1.app/Contents/Developer/usr/bin/simctl
�[40m�[37mdbug�[39m�[22m�[49m: Process simctl exited with 0
�[40m�[32minfo�[39m�[22m�[49m: Application 'com.microsoft.maui.core.devicetests' was uninstalled successfully
�[40m�[32minfo�[39m�[22m�[49m: Installing application 'Microsoft.Maui.Core.DeviceTests' on 'iPhone 11 Pro'
�[40m�[37mdbug�[39m�[22m�[49m: Installing '/Users/cloudtest/vss/_work/1/s/artifacts/bin/Core.DeviceTests/Release/net10.0-ios/iossimulator-arm64/Microsoft.Maui.Core.DeviceTests.app' to 'iPhone 11 Pro' (150.73 MB)
�[40m�[37mdbug�[39m�[22m�[49m: 
�[40m�[37mdbug�[39m�[22m�[49m: Running /Users/cloudtest/.nuget/packages/microsoft.dotnet.xharness.cli/11.0.0-prerelease.26107.1/tools/net10.0/any/../../../runtimes/any/native/mlaunch/bin/mlaunch
�[40m�[37mdbug�[39m�[22m�[49m: Using Xcode 26.1.1 found in /Applications/Xcode_26.1.1.app
�[40m�[37mdbug�[39m�[22m�[49m: xcrun simctl list --json --json-output /tmp/tmptAJ46n.tmp
�[40m�[37mdbug�[39m�[22m�[49m: Xamarin.Hosting: No need to boot (already booted): iPhone 11 Pro
�[40m�[37mdbug�[39m�[22m�[49m: Xamarin.Hosting: Installing on iPhone 11 Pro (2B198A32-6A32-4951-883E-8FF86976A4E0) by executing 'xcrun simctl install 2B198A32-6A32-4951-883E-8FF86976A4E0 /Users/cloudtest/vss/_work/1/s/artifacts/bin/Core.DeviceTests/Release/net10.0-ios/iossimulator-arm64/Microsoft.Maui.Core.DeviceTests.app'
�[40m�[37mdbug�[39m�[22m�[49m: Xamarin.Hosting: The bundle id com.microsoft.maui.core.devicetests was successfully installed.
�[40m�[37mdbug�[39m�[22m�[49m: Process mlaunch exited with 0
�[40m�[32minfo�[39m�[22m�[49m: Application 'Microsoft.Maui.Core.DeviceTests' was installed successfully on 'iPhone 11 Pro'
�[40m�[32minfo�[39m�[22m�[49m: Starting test run for com.microsoft.maui.core.devicetests..
�[40m�[37mdbug�[39m�[22m�[49m: *** Executing 'Microsoft.Maui.Core.DeviceTests' on ios-simulator-64_18.6 'iPhone 11 Pro' ***
�[40m�[37mdbug�[39m�[22m�[49m: Test log server listening on: 0.0.0.0:51664
�[40m�[37mdbug�[39m�[22m�[49m: System log for the 'iPhone 11 Pro' simulator is: /Users/cloudtest/Library/Logs/CoreSimulator/2B198A32-6A32-4951-883E-8FF86976A4E0/system.log
�[40m�[37mdbug�[39m�[22m�[49m: Simulator 'iPhone 11 Pro' is already booted
�[40m�[37mdbug�[39m�[22m�[49m: Scanning log stream for Microsoft.Maui.Core.DeviceTests into '/Users/cloudtest/vss/_work/1/s/artifacts/log/Microsoft.Maui.Core.DeviceTests.log'..
�[40m�[37mdbug�[39m�[22m�[49m: 
�[40m�[37mdbug�[39m�[22m�[49m: Running /Applications/Xcode_26.1.1.app/Contents/Developer/usr/bin/simctl
�[40m�[37mdbug�[39m�[22m�[49m: Launching the app
�[40m�[37mdbug�[39m�[22m�[49m: 
�[40m�[37mdbug�[39m�[22m�[49m: Running /Users/cloudtest/.nuget/packages/microsoft.dotnet.xharness.cli/11.0.0-prerelease.26107.1/tools/net10.0/any/../../../runtimes/any/native/mlaunch/bin/mlaunch
�[40m�[37mdbug�[39m�[22m�[49m: Connection from 127.0.0.1:51684 saving logs to /Users/cloudtest/vss/_work/1/s/artifacts/log/test-ios-simulator-64_18.6-20260411_053300.log
�[40m�[37mdbug�[39m�[22m�[49m: Tests have finished executing
�[40m�[37mdbug�[39m�[22m�[49m: Process mlaunch exited with 0
�[40m�[37mdbug�[39m�[22m�[49m: Process simctl exited with 137
�[40m�[37mdbug�[39m�[22m�[49m: Test run completed
�[40m�[37mdbug�[39m�[22m�[49m: 
�[40m�[37mdbug�[39m�[22m�[49m: Running /bin/bash
�[40m�[37mdbug�[39m�[22m�[49m: cp: /Users/cloudtest/Library/Developer/CoreSimulator/Devices/2B198A32-6A32-4951-883E-8FF86976A4E0/data/Containers/Data/Application/E48D4AE2-380C-4EFA-9317-EBE80AC1D7E2/Documents/test-results.xml: No such file or directory
�[40m�[37mdbug�[39m�[22m�[49m: Process bash exited with 1
�[40m�[37mdbug�[39m�[22m�[49m: Test run succeeded
�[40m�[37mdbug�[39m�[22m�[49m: No crash reports, waiting 0 seconds for the crash report service...
�[40m�[32minfo�[39m�[22m�[49m: Application finished the test run successfully
�[40m�[32minfo�[39m�[22m�[49m: Tests run: 113 Passed: 112 Inconclusive: 0 Failed: 0 Ignored: 1
�[40m�[32minfo�[39m�[22m�[49m: Uninstalling the application 'com.microsoft.maui.core.devicetests' from 'iPhone 11 Pro'
�[40m�[37mdbug�[39m�[22m�[49m: 
�[40m�[37mdbug�[39m�[22m�[49m: Running /Applications/Xcode_26.1.1.app/Contents/Developer/usr/bin/simctl
�[40m�[37mdbug�[39m�[22m�[49m: Process simctl exited with 0
�[40m�[32minfo�[39m�[22m�[49m: Application 'com.microsoft.maui.core.devicetests' was uninstalled successfully
XHarness exit code: 0
  Passed: 2743
  Failed: 0
  Tests completed successfully

🔴 Without fix — 📱 LabelStub: PASS ❌ · 113s
  Determining projects to restore...
  All projects are up-to-date for restore.
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13810028
  Graphics -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Graphics/Release/net10.0-ios26.0/Microsoft.Maui.Graphics.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13810028
  Essentials -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Essentials/Release/net10.0-ios26.0/Microsoft.Maui.Essentials.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13810028
  Core -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Core/Release/net10.0-ios26.0/Microsoft.Maui.dll
  Controls.BindingSourceGen -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.BindingSourceGen/Release/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13810028
  TestUtils.DeviceTests -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/TestUtils.DeviceTests/Release/net10.0-ios/Microsoft.Maui.TestUtils.DeviceTests.dll
  Controls.Core -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Core/Release/net10.0-ios26.0/Microsoft.Maui.Controls.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13810028
  Controls.Xaml -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Xaml/Release/net10.0-ios26.0/Microsoft.Maui.Controls.Xaml.dll
  TestUtils.DeviceTests.Runners -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/TestUtils.DeviceTests.Runners/Release/net10.0-ios/Microsoft.Maui.TestUtils.DeviceTests.Runners.dll
  Core.DeviceTests.Shared -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Core.DeviceTests.Shared/Release/net10.0-ios/Microsoft.Maui.DeviceTests.Shared.dll
  TestUtils.DeviceTests.Runners.SourceGen -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/TestUtils.DeviceTests.Runners.SourceGen/Release/netstandard2.0/Microsoft.Maui.TestUtils.DeviceTests.Runners.SourceGen.dll
  Detected signing identity:
    Code Signing Key: "" (-)
    Provisioning Profile: "" () - no entitlements
    Bundle Id: com.microsoft.maui.core.devicetests
    App Id: com.microsoft.maui.core.devicetests
  Core.DeviceTests -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Core.DeviceTests/Release/net10.0-ios/iossimulator-arm64/Microsoft.Maui.Core.DeviceTests.dll
  Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink
  IL stripping assemblies

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:05.27
[11.0.0-prerelease.26107.1+bfbac237157e59cdbd19334325b2af80bd6e9828] XHarness command issued: apple test --app artifacts/bin/Core.DeviceTests/Release/net10.0-ios/iossimulator-arm64/Microsoft.Maui.Core.DeviceTests.app --target ios-simulator-64_18.6 --device 2B198A32-6A32-4951-883E-8FF86976A4E0 -o artifacts/log --timeout 01:00:00 -v --set-env=TestFilter=LabelStub
�[40m�[32minfo�[39m�[22m�[49m: Preparing run for ios-simulator-64_18.6 targeting 2B198A32-6A32-4951-883E-8FF86976A4E0
�[40m�[32minfo�[39m�[22m�[49m: Looking for available ios-simulator-64_18.6 simulators..
�[40m�[37mdbug�[39m�[22m�[49m: Looking for available ios-simulator-64_18.6 simulators. Storing logs into list-ios-simulator-64_18.6-20260411_052619.log
�[40m�[32minfo�[39m�[22m�[49m: Found simulator device 'iPhone 11 Pro'
�[40m�[32minfo�[39m�[22m�[49m: Getting app bundle information from '/Users/cloudtest/vss/_work/1/s/artifacts/bin/Core.DeviceTests/Release/net10.0-ios/iossimulator-arm64/Microsoft.Maui.Core.DeviceTests.app'..
�[40m�[37mdbug�[39m�[22m�[49m: 
�[40m�[37mdbug�[39m�[22m�[49m: Running /usr/libexec/PlistBuddy
�[40m�[37mdbug�[39m�[22m�[49m: Process PlistBuddy exited with 0
�[40m�[37mdbug�[39m�[22m�[49m: 
�[40m�[37mdbug�[39m�[22m�[49m: Running /usr/libexec/PlistBuddy
�[40m�[37mdbug�[39m�[22m�[49m: Process PlistBuddy exited with 0
�[40m�[37mdbug�[39m�[22m�[49m: 
�[40m�[37mdbug�[39m�[22m�[49m: Running /usr/libexec/PlistBuddy
�[40m�[37mdbug�[39m�[22m�[49m: Process PlistBuddy exited with 0
�[40m�[37mdbug�[39m�[22m�[49m: 
�[40m�[37mdbug�[39m�[22m�[49m: Running /usr/libexec/PlistBuddy
�[40m�[37mdbug�[39m�[22m�[49m: Process PlistBuddy exited with 0
�[40m�[32minfo�[39m�[22m�[49m: Uninstalling any previous instance of 'com.microsoft.maui.core.devicetests' from 'iPhone 11 Pro'
�[40m�[37mdbug�[39m�[22m�[49m: 
�[40m�[37mdbug�[39m�[22m�[49m: Running /Applications/Xcode_26.1.1.app/Contents/Developer/usr/bin/simctl
�[40m�[37mdbug�[39m�[22m�[49m: Process simctl exited with 0
�[40m�[32minfo�[39m�[22m�[49m: Application 'com.microsoft.maui.core.devicetests' was uninstalled successfully
�[40m�[32minfo�[39m�[22m�[49m: Installing application 'Microsoft.Maui.Core.DeviceTests' on 'iPhone 11 Pro'
�[40m�[37mdbug�[39m�[22m�[49m: Installing '/Users/cloudtest/vss/_work/1/s/artifacts/bin/Core.DeviceTests/Release/net10.0-ios/iossimulator-arm64/Microsoft.Maui.Core.DeviceTests.app' to 'iPhone 11 Pro' (150.73 MB)
�[40m�[37mdbug�[39m�[22m�[49m: 
�[40m�[37mdbug�[39m�[22m�[49m: Running /Users/cloudtest/.nuget/packages/microsoft.dotnet.xharness.cli/11.0.0-prerelease.26107.1/tools/net10.0/any/../../../runtimes/any/native/mlaunch/bin/mlaunch
�[40m�[37mdbug�[39m�[22m�[49m: Using Xcode 26.1.1 found in /Applications/Xcode_26.1.1.app
�[40m�[37mdbug�[39m�[22m�[49m: xcrun simctl list --json --json-output /tmp/tmpPEx12f.tmp
�[40m�[37mdbug�[39m�[22m�[49m: Xamarin.Hosting: No need to boot (already booted): iPhone 11 Pro
�[40m�[37mdbug�[39m�[22m�[49m: Xamarin.Hosting: Installing on iPhone 11 Pro (2B198A32-6A32-4951-883E-8FF86976A4E0) by executing 'xcrun simctl install 2B198A32-6A32-4951-883E-8FF86976A4E0 /Users/cloudtest/vss/_work/1/s/artifacts/bin/Core.DeviceTests/Release/net10.0-ios/iossimulator-arm64/Microsoft.Maui.Core.DeviceTests.app'
�[40m�[37mdbug�[39m�[22m�[49m: Xamarin.Hosting: The bundle id com.microsoft.maui.core.devicetests was successfully installed.
�[40m�[37mdbug�[39m�[22m�[49m: Process mlaunch exited with 0
�[40m�[32minfo�[39m�[22m�[49m: Application 'Microsoft.Maui.Core.DeviceTests' was installed successfully on 'iPhone 11 Pro'
�[40m�[32minfo�[39m�[22m�[49m: Starting test run for com.microsoft.maui.core.devicetests..
�[40m�[37mdbug�[39m�[22m�[49m: *** Executing 'Microsoft.Maui.Core.DeviceTests' on ios-simulator-64_18.6 'iPhone 11 Pro' ***
�[40m�[37mdbug�[39m�[22m�[49m: Test log server listening on: 0.0.0.0:53993
�[40m�[37mdbug�[39m�[22m�[49m: System log for the 'iPhone 11 Pro' simulator is: /Users/cloudtest/Library/Logs/CoreSimulator/2B198A32-6A32-4951-883E-8FF86976A4E0/system.log
�[40m�[37mdbug�[39m�[22m�[49m: Simulator 'iPhone 11 Pro' is already booted
�[40m�[37mdbug�[39m�[22m�[49m: Scanning log stream for Microsoft.Maui.Core.DeviceTests into '/Users/cloudtest/vss/_work/1/s/artifacts/log/Microsoft.Maui.Core.DeviceTests.log'..
�[40m�[37mdbug�[39m�[22m�[49m: 
�[40m�[37mdbug�[39m�[22m�[49m: Running /Applications/Xcode_26.1.1.app/Contents/Developer/usr/bin/simctl
�[40m�[37mdbug�[39m�[22m�[49m: Launching the app
�[40m�[37mdbug�[39m�[22m�[49m: 
�[40m�[37mdbug�[39m�[22m�[49m: Running /Users/cloudtest/.nuget/packages/microsoft.dotnet.xharness.cli/11.0.0-prerelease.26107.1/tools/net10.0/any/../../../runtimes/any/native/mlaunch/bin/mlaunch
�[40m�[37mdbug�[39m�[22m�[49m: Connection from 127.0.0.1:54002 saving logs to /Users/cloudtest/vss/_work/1/s/artifacts/log/test-ios-simulator-64_18.6-20260411_052622.log
�[40m�[37mdbug�[39m�[22m�[49m: Tests have finished executing
�[40m�[37mdbug�[39m�[22m�[49m: Process mlaunch exited with 0
�[40m�[37mdbug�[39m�[22m�[49m: Test run completed
�[40m�[37mdbug�[39m�[22m�[49m: 
�[40m�[37mdbug�[39m�[22m�[49m: Running /bin/bash
�[40m�[37mdbug�[39m�[22m�[49m: cp: /Users/cloudtest/Library/Developer/CoreSimulator/Devices/2B198A32-6A32-4951-883E-8FF86976A4E0/data/Containers/Data/Application/E0897DD6-4E9E-4993-AFD4-38768F5857C2/Documents/test-results.xml: No such file or directory
�[40m�[37mdbug�[39m�[22m�[49m: Process bash exited with 1
�[40m�[37mdbug�[39m�[22m�[49m: Test run succeeded
�[40m�[37mdbug�[39m�[22m�[49m: No crash reports, waiting 0 seconds for the crash report service...
�[40m�[32minfo�[39m�[22m�[49m: Application finished the test run successfully
�[40m�[32minfo�[39m�[22m�[49m: Tests run: 2559 Passed: 2519 Inconclusive: 0 Failed: 0 Ignored: 40
�[40m�[32minfo�[39m�[22m�[49m: Uninstalling the application 'com.microsoft.maui.core.devicetests' from 'iPhone 11 Pro'
�[40m�[37mdbug�[39m�[22m�[49m: 
�[40m�[37mdbug�[39m�[22m�[49m: Running /Applications/Xcode_26.1.1.app/Contents/Developer/usr/bin/simctl
�[40m�[37mdbug�[39m�[22m�[49m: Process simctl exited with 0
�[40m�[32minfo�[39m�[22m�[49m: Application 'com.microsoft.maui.core.devicetests' was uninstalled successfully
XHarness exit code: 0
  Passed: 2631
  Failed: 0
  Tests completed successfully

🟢 With fix — 📱 LabelStub: FAIL ❌ · 121s
  Determining projects to restore...
  All projects are up-to-date for restore.
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13810028
  Graphics -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Graphics/Release/net10.0-ios26.0/Microsoft.Maui.Graphics.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13810028
  Essentials -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Essentials/Release/net10.0-ios26.0/Microsoft.Maui.Essentials.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13810028
  Core -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Core/Release/net10.0-ios26.0/Microsoft.Maui.dll
  Controls.BindingSourceGen -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.BindingSourceGen/Release/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
  TestUtils.DeviceTests -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/TestUtils.DeviceTests/Release/net10.0-ios/Microsoft.Maui.TestUtils.DeviceTests.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13810028
  Controls.Core -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Core/Release/net10.0-ios26.0/Microsoft.Maui.Controls.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13810028
  Controls.Xaml -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Xaml/Release/net10.0-ios26.0/Microsoft.Maui.Controls.Xaml.dll
  TestUtils.DeviceTests.Runners -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/TestUtils.DeviceTests.Runners/Release/net10.0-ios/Microsoft.Maui.TestUtils.DeviceTests.Runners.dll
  Core.DeviceTests.Shared -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Core.DeviceTests.Shared/Release/net10.0-ios/Microsoft.Maui.DeviceTests.Shared.dll
  TestUtils.DeviceTests.Runners.SourceGen -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/TestUtils.DeviceTests.Runners.SourceGen/Release/netstandard2.0/Microsoft.Maui.TestUtils.DeviceTests.Runners.SourceGen.dll
  Detected signing identity:
    Code Signing Key: "" (-)
    Provisioning Profile: "" () - no entitlements
    Bundle Id: com.microsoft.maui.core.devicetests
    App Id: com.microsoft.maui.core.devicetests
  Core.DeviceTests -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Core.DeviceTests/Release/net10.0-ios/iossimulator-arm64/Microsoft.Maui.Core.DeviceTests.dll
  Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink
  IL stripping assemblies

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:05.62
[11.0.0-prerelease.26107.1+bfbac237157e59cdbd19334325b2af80bd6e9828] XHarness command issued: apple test --app artifacts/bin/Core.DeviceTests/Release/net10.0-ios/iossimulator-arm64/Microsoft.Maui.Core.DeviceTests.app --target ios-simulator-64_18.6 --device 2B198A32-6A32-4951-883E-8FF86976A4E0 -o artifacts/log --timeout 01:00:00 -v --set-env=TestFilter=LabelStub
�[40m�[32minfo�[39m�[22m�[49m: Preparing run for ios-simulator-64_18.6 targeting 2B198A32-6A32-4951-883E-8FF86976A4E0
�[40m�[32minfo�[39m�[22m�[49m: Looking for available ios-simulator-64_18.6 simulators..
�[40m�[37mdbug�[39m�[22m�[49m: Looking for available ios-simulator-64_18.6 simulators. Storing logs into list-ios-simulator-64_18.6-20260411_053326.log
�[40m�[32minfo�[39m�[22m�[49m: Found simulator device 'iPhone 11 Pro'
�[40m�[32minfo�[39m�[22m�[49m: Getting app bundle information from '/Users/cloudtest/vss/_work/1/s/artifacts/bin/Core.DeviceTests/Release/net10.0-ios/iossimulator-arm64/Microsoft.Maui.Core.DeviceTests.app'..
�[40m�[37mdbug�[39m�[22m�[49m: 
�[40m�[37mdbug�[39m�[22m�[49m: Running /usr/libexec/PlistBuddy
�[40m�[37mdbug�[39m�[22m�[49m: Process PlistBuddy exited with 0
�[40m�[37mdbug�[39m�[22m�[49m: 
�[40m�[37mdbug�[39m�[22m�[49m: Running /usr/libexec/PlistBuddy
�[40m�[37mdbug�[39m�[22m�[49m: Process PlistBuddy exited with 0
�[40m�[37mdbug�[39m�[22m�[49m: 
�[40m�[37mdbug�[39m�[22m�[49m: Running /usr/libexec/PlistBuddy
�[40m�[37mdbug�[39m�[22m�[49m: Process PlistBuddy exited with 0
�[40m�[37mdbug�[39m�[22m�[49m: 
�[40m�[37mdbug�[39m�[22m�[49m: Running /usr/libexec/PlistBuddy
�[40m�[37mdbug�[39m�[22m�[49m: Process PlistBuddy exited with 0
�[40m�[32minfo�[39m�[22m�[49m: Uninstalling any previous instance of 'com.microsoft.maui.core.devicetests' from 'iPhone 11 Pro'
�[40m�[37mdbug�[39m�[22m�[49m: 
�[40m�[37mdbug�[39m�[22m�[49m: Running /Applications/Xcode_26.1.1.app/Contents/Developer/usr/bin/simctl
�[40m�[37mdbug�[39m�[22m�[49m: Process simctl exited with 0
�[40m�[32minfo�[39m�[22m�[49m: Application 'com.microsoft.maui.core.devicetests' was uninstalled successfully
�[40m�[32minfo�[39m�[22m�[49m: Installing application 'Microsoft.Maui.Core.DeviceTests' on 'iPhone 11 Pro'
�[40m�[37mdbug�[39m�[22m�[49m: Installing '/Users/cloudtest/vss/_work/1/s/artifacts/bin/Core.DeviceTests/Release/net10.0-ios/iossimulator-arm64/Microsoft.Maui.Core.DeviceTests.app' to 'iPhone 11 Pro' (150.73 MB)
�[40m�[37mdbug�[39m�[22m�[49m: 
�[40m�[37mdbug�[39m�[22m�[49m: Running /Users/cloudtest/.nuget/packages/microsoft.dotnet.xharness.cli/11.0.0-prerelease.26107.1/tools/net10.0/any/../../../runtimes/any/native/mlaunch/bin/mlaunch
�[40m�[37mdbug�[39m�[22m�[49m: Using Xcode 26.1.1 found in /Applications/Xcode_26.1.1.app
�[40m�[37mdbug�[39m�[22m�[49m: xcrun simctl list --json --json-output /tmp/tmpEI4M1t.tmp
�[40m�[37mdbug�[39m�[22m�[49m: Xamarin.Hosting: No need to boot (already booted): iPhone 11 Pro
�[40m�[37mdbug�[39m�[22m�[49m: Xamarin.Hosting: Installing on iPhone 11 Pro (2B198A32-6A32-4951-883E-8FF86976A4E0) by executing 'xcrun simctl install 2B198A32-6A32-4951-883E-8FF86976A4E0 /Users/cloudtest/vss/_work/1/s/artifacts/bin/Core.DeviceTests/Release/net10.0-ios/iossimulator-arm64/Microsoft.Maui.Core.DeviceTests.app'
�[40m�[37mdbug�[39m�[22m�[49m: Xamarin.Hosting: The bundle id com.microsoft.maui.core.devicetests was successfully installed.
�[40m�[37mdbug�[39m�[22m�[49m: Process mlaunch exited with 0
�[40m�[32minfo�[39m�[22m�[49m: Application 'Microsoft.Maui.Core.DeviceTests' was installed successfully on 'iPhone 11 Pro'
�[40m�[32minfo�[39m�[22m�[49m: Starting test run for com.microsoft.maui.core.devicetests..
�[40m�[37mdbug�[39m�[22m�[49m: *** Executing 'Microsoft.Maui.Core.DeviceTests' on ios-simulator-64_18.6 'iPhone 11 Pro' ***
�[40m�[37mdbug�[39m�[22m�[49m: Test log server listening on: 0.0.0.0:51813
�[40m�[37mdbug�[39m�[22m�[49m: System log for the 'iPhone 11 Pro' simulator is: /Users/cloudtest/Library/Logs/CoreSimulator/2B198A32-6A32-4951-883E-8FF86976A4E0/system.log
�[40m�[37mdbug�[39m�[22m�[49m: Simulator 'iPhone 11 Pro' is already booted
�[40m�[37mdbug�[39m�[22m�[49m: Scanning log stream for Microsoft.Maui.Core.DeviceTests into '/Users/cloudtest/vss/_work/1/s/artifacts/log/Microsoft.Maui.Core.DeviceTests.log'..
�[40m�[37mdbug�[39m�[22m�[49m: 
�[40m�[37mdbug�[39m�[22m�[49m: Running /Applications/Xcode_26.1.1.app/Contents/Developer/usr/bin/simctl
�[40m�[37mdbug�[39m�[22m�[49m: Launching the app
�[40m�[37mdbug�[39m�[22m�[49m: 
�[40m�[37mdbug�[39m�[22m�[49m: Running /Users/cloudtest/.nuget/packages/microsoft.dotnet.xharness.cli/11.0.0-prerelease.26107.1/tools/net10.0/any/../../../runtimes/any/native/mlaunch/bin/mlaunch
�[40m�[37mdbug�[39m�[22m�[49m: Connection from 127.0.0.1:51822 saving logs to /Users/cloudtest/vss/_work/1/s/artifacts/log/test-ios-simulator-64_18.6-20260411_053328.log
�[40m�[37mdbug�[39m�[22m�[49m: Tests have finished executing
�[40m�[37mdbug�[39m�[22m�[49m: Process mlaunch exited with 0
�[40m�[37mdbug�[39m�[22m�[49m: Test run completed
�[40m�[37mdbug�[39m�[22m�[49m: 
�[40m�[37mdbug�[39m�[22m�[49m: Running /bin/bash
�[40m�[37mdbug�[39m�[22m�[49m: cp: /Users/cloudtest/Library/Developer/CoreSimulator/Devices/2B198A32-6A32-4951-883E-8FF86976A4E0/data/Containers/Data/Application/43142980-51EA-4F46-93FA-EB2B2C01B305/Documents/test-results.xml: No such file or directory
�[40m�[37mdbug�[39m�[22m�[49m: Process bash exited with 1
�[40m�[37mdbug�[39m�[22m�[49m: Test run failed
�[40m�[37mdbug�[39m�[22m�[49m: No crash reports, waiting 5 seconds for the crash report service...
�[40m�[32minfo�[39m�[22m�[49m: Application finished the test run successfully with some failed tests
�[40m�[32minfo�[39m�[22m�[49m: Tests run: 2559 Passed: 2516 Inconclusive: 0 Failed: 3 Ignored: 40
�[40m�[32minfo�[39m�[22m�[49m: Uninstalling the application 'com.microsoft.maui.core.devicetests' from 'iPhone 11 Pro'
�[40m�[37mdbug�[39m�[22m�[49m: 
�[40m�[37mdbug�[39m�[22m�[49m: Running /Applications/Xcode_26.1.1.app/Contents/Developer/usr/bin/simctl
�[40m�[37mdbug�[39m�[22m�[49m: Process simctl exited with 0
�[40m�[32minfo�[39m�[22m�[49m: Application 'com.microsoft.maui.core.devicetests' was uninstalled successfully
XHarness exit code: 1 (TESTS_FAILED)
  Passed: 5259
  Failed: 9
  Tests completed with exit code: 1

🔴 Without fix — 🖥️ Issue31480: FAIL ✅ · 142s
  Determining projects to restore...
  Restored /Users/cloudtest/vss/_work/1/s/src/Controls/src/BindingSourceGen/Controls.BindingSourceGen.csproj (in 419 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Graphics/src/Graphics/Graphics.csproj (in 430 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Essentials/src/Essentials.csproj (in 465 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Core/src/Core.csproj (in 550 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Controls/src/Core/Controls.Core.csproj (in 550 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Controls/src/Xaml/Controls.Xaml.csproj (in 567 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Controls/Foldable/src/Controls.Foldable.csproj (in 902 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Core/maps/src/Maps.csproj (in 1.69 sec).
  Restored /Users/cloudtest/vss/_work/1/s/src/Controls/Maps/src/Controls.Maps.csproj (in 1.69 sec).
  Restored /Users/cloudtest/vss/_work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj (in 2.11 sec).
  Restored /Users/cloudtest/vss/_work/1/s/src/BlazorWebView/src/Maui/Microsoft.AspNetCore.Components.WebView.Maui.csproj (in 2.11 sec).
/Users/cloudtest/vss/_work/1/s/.dotnet/packs/Microsoft.iOS.Sdk.net10.0_26.0/26.0.11017/targets/Xamarin.Shared.Sdk.targets(309,3): warning : RuntimeIdentifier was set on the command line, and will override the value for RuntimeIdentifiers set in the project file. [/Users/cloudtest/vss/_work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-ios]
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13810028
  Graphics -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Graphics/Debug/net10.0-ios26.0/Microsoft.Maui.Graphics.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13810028
  Essentials -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Essentials/Debug/net10.0-ios26.0/Microsoft.Maui.Essentials.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13810028
  Core -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Core/Debug/net10.0-ios26.0/Microsoft.Maui.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13810028
  Maps -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Maps/Debug/net10.0-ios26.0/Microsoft.Maui.Maps.dll
  Controls.BindingSourceGen -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13810028
  Controls.Core -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Core/Debug/net10.0-ios26.0/Microsoft.Maui.Controls.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13810028
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13810028
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13810028
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13810028
  Controls.Maps -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Maps/Debug/net10.0-ios26.0/Microsoft.Maui.Controls.Maps.dll
  Microsoft.AspNetCore.Components.WebView.Maui -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Microsoft.AspNetCore.Components.WebView.Maui/Debug/net10.0-ios26.0/Microsoft.AspNetCore.Components.WebView.Maui.dll
  Controls.Foldable -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Foldable/Debug/net10.0-ios26.0/Microsoft.Maui.Controls.Foldable.dll
  Controls.Xaml -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Xaml/Debug/net10.0-ios26.0/Microsoft.Maui.Controls.Xaml.dll
  Detected signing identity:
    Code Signing Key: "" (-)
    Provisioning Profile: "" () - no entitlements
    Bundle Id: com.microsoft.maui.uitests
    App Id: com.microsoft.maui.uitests
  Controls.TestCases.HostApp -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-ios/iossimulator-arm64/Controls.TestCases.HostApp.dll
  Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink
  Optimizing assemblies for size. This process might take a while.

Build succeeded.

/Users/cloudtest/vss/_work/1/s/.dotnet/packs/Microsoft.iOS.Sdk.net10.0_26.0/26.0.11017/targets/Xamarin.Shared.Sdk.targets(309,3): warning : RuntimeIdentifier was set on the command line, and will override the value for RuntimeIdentifiers set in the project file. [/Users/cloudtest/vss/_work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-ios]
    1 Warning(s)
    0 Error(s)

Time Elapsed 00:00:54.49
  Determining projects to restore...
  Restored /Users/cloudtest/vss/_work/1/s/src/Controls/tests/CustomAttributes/Controls.CustomAttributes.csproj (in 522 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/TestUtils/src/VisualTestUtils/VisualTestUtils.csproj (in 529 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Controls/src/BindingSourceGen/Controls.BindingSourceGen.csproj (in 532 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Graphics/src/Graphics/Graphics.csproj (in 535 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/TestUtils/src/UITest.Core/UITest.Core.csproj (in 522 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Controls/src/Core/Controls.Core.csproj (in 561 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Essentials/src/Essentials.csproj (in 15 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Core/src/Core.csproj (in 583 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/TestUtils/src/UITest.NUnit/UITest.NUnit.csproj (in 1.33 sec).
  Restored /Users/cloudtest/vss/_work/1/s/src/TestUtils/src/UITest.Appium/UITest.Appium.csproj (in 1.58 sec).
  Restored /Users/cloudtest/vss/_work/1/s/src/TestUtils/src/UITest.Analyzers/UITest.Analyzers.csproj (in 2.64 sec).
  Restored /Users/cloudtest/vss/_work/1/s/src/TestUtils/src/VisualTestUtils.MagickNet/VisualTestUtils.MagickNet.csproj (in 3.41 sec).
  Restored /Users/cloudtest/vss/_work/1/s/src/Controls/tests/TestCases.iOS.Tests/Controls.TestCases.iOS.Tests.csproj (in 3.43 sec).
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13810028
  Controls.CustomAttributes -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.CustomAttributes/Debug/net10.0/Controls.CustomAttributes.dll
  Graphics -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Graphics/Debug/net10.0/Microsoft.Maui.Graphics.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13810028
  Essentials -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Essentials/Debug/net10.0/Microsoft.Maui.Essentials.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13810028
  Core -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Core/Debug/net10.0/Microsoft.Maui.dll
  Controls.BindingSourceGen -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13810028
  Controls.Core -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Core/Debug/net10.0/Microsoft.Maui.Controls.dll
  UITest.Core -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/UITest.Core/Debug/net10.0/UITest.Core.dll
  VisualTestUtils -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/VisualTestUtils/Debug/netstandard2.0/VisualTestUtils.dll
  UITest.NUnit -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/UITest.NUnit/Debug/net10.0/UITest.NUnit.dll
  VisualTestUtils.MagickNet -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/VisualTestUtils.MagickNet/Debug/netstandard2.0/VisualTestUtils.MagickNet.dll
  UITest.Appium -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/UITest.Appium/Debug/net10.0/UITest.Appium.dll
  UITest.Analyzers -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/UITest.Analyzers/Debug/netstandard2.0/UITest.Analyzers.dll
  Controls.TestCases.iOS.Tests -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/Controls.TestCases.iOS.Tests.dll
Test run for /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/Controls.TestCases.iOS.Tests.dll (.NETCoreApp,Version=v10.0)
VSTest version 18.0.1 (arm64)

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
/Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/Controls.TestCases.iOS.Tests.dll
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.8.2+699d445a1a (64-bit .NET 10.0.0)
[xUnit.net 00:00:00.05]   Discovering: Controls.TestCases.iOS.Tests
[xUnit.net 00:00:00.14]   Discovered:  Controls.TestCases.iOS.Tests
NUnit Adapter 4.5.0.0: Test execution started
Running selected tests in /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/Controls.TestCases.iOS.Tests.dll
   NUnit3TestExecutor discovered 1 of 1 NUnit test cases using Current Discovery mode, Non-Explicit run
>>>>> 4/11/2026 5:30:10 AM FixtureSetup for Issue31480(iOS)
>>>>> 4/11/2026 5:30:13 AM FormattedTextToggleFlowDirectionTest Start
>>>>> 4/11/2026 5:30:18 AM FormattedTextToggleFlowDirectionTest Stop
>>>>> 4/11/2026 5:30:18 AM Log types: syslog, crashlog, performance, safariConsole, safariNetwork, server
  Failed FormattedTextToggleFlowDirectionTest [5 s]
  Error Message:
   VisualTestUtils.VisualTestFailedException : 
Snapshot different than baseline: Issue81_InitialLTR.png (4.41% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow

  Stack Trace:
     at Microsoft.Maui.TestCases.Tests.Issues.Issue31480.FormattedTextToggleFlowDirectionTest() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue31480.cs:line 36
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

NUnit Adapter 4.5.0.0: Test execution complete

Total tests: 1
     Failed: 1
Test Run Failed.
 Total time: 50.0605 Seconds

🟢 With fix — 🖥️ Issue31480: FAIL ❌ · 98s
  Determining projects to restore...
  Restored /Users/cloudtest/vss/_work/1/s/src/Controls/src/BindingSourceGen/Controls.BindingSourceGen.csproj (in 339 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Graphics/src/Graphics/Graphics.csproj (in 357 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Essentials/src/Essentials.csproj (in 360 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Controls/src/Xaml/Controls.Xaml.csproj (in 397 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Core/src/Core.csproj (in 397 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Controls/src/Core/Controls.Core.csproj (in 411 ms).
  5 of 11 projects are up-to-date for restore.
/Users/cloudtest/vss/_work/1/s/.dotnet/packs/Microsoft.iOS.Sdk.net10.0_26.0/26.0.11017/targets/Xamarin.Shared.Sdk.targets(309,3): warning : RuntimeIdentifier was set on the command line, and will override the value for RuntimeIdentifiers set in the project file. [/Users/cloudtest/vss/_work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-ios]
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13810028
  Graphics -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Graphics/Debug/net10.0-ios26.0/Microsoft.Maui.Graphics.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13810028
  Essentials -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Essentials/Debug/net10.0-ios26.0/Microsoft.Maui.Essentials.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13810028
  Core -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Core/Debug/net10.0-ios26.0/Microsoft.Maui.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13810028
  Maps -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Maps/Debug/net10.0-ios26.0/Microsoft.Maui.Maps.dll
  Controls.BindingSourceGen -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13810028
  Controls.Core -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Core/Debug/net10.0-ios26.0/Microsoft.Maui.Controls.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13810028
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13810028
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13810028
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13810028
  Controls.Maps -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Maps/Debug/net10.0-ios26.0/Microsoft.Maui.Controls.Maps.dll
  Microsoft.AspNetCore.Components.WebView.Maui -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Microsoft.AspNetCore.Components.WebView.Maui/Debug/net10.0-ios26.0/Microsoft.AspNetCore.Components.WebView.Maui.dll
  Controls.Foldable -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Foldable/Debug/net10.0-ios26.0/Microsoft.Maui.Controls.Foldable.dll
  Controls.Xaml -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Xaml/Debug/net10.0-ios26.0/Microsoft.Maui.Controls.Xaml.dll
  Detected signing identity:
    Code Signing Key: "" (-)
    Provisioning Profile: "" () - no entitlements
    Bundle Id: com.microsoft.maui.uitests
    App Id: com.microsoft.maui.uitests
  Controls.TestCases.HostApp -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-ios/iossimulator-arm64/Controls.TestCases.HostApp.dll
  Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink
  Optimizing assemblies for size. This process might take a while.

Build succeeded.

/Users/cloudtest/vss/_work/1/s/.dotnet/packs/Microsoft.iOS.Sdk.net10.0_26.0/26.0.11017/targets/Xamarin.Shared.Sdk.targets(309,3): warning : RuntimeIdentifier was set on the command line, and will override the value for RuntimeIdentifiers set in the project file. [/Users/cloudtest/vss/_work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-ios]
    1 Warning(s)
    0 Error(s)

Time Elapsed 00:00:45.90
  Determining projects to restore...
  Restored /Users/cloudtest/vss/_work/1/s/src/Controls/src/BindingSourceGen/Controls.BindingSourceGen.csproj (in 354 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Essentials/src/Essentials.csproj (in 355 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Graphics/src/Graphics/Graphics.csproj (in 355 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Controls/src/Core/Controls.Core.csproj (in 379 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Core/src/Core.csproj (in 396 ms).
  8 of 13 projects are up-to-date for restore.
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13810028
  Graphics -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Graphics/Debug/net10.0/Microsoft.Maui.Graphics.dll
  Controls.CustomAttributes -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.CustomAttributes/Debug/net10.0/Controls.CustomAttributes.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13810028
  Essentials -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Essentials/Debug/net10.0/Microsoft.Maui.Essentials.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13810028
  Core -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Core/Debug/net10.0/Microsoft.Maui.dll
  Controls.BindingSourceGen -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13810028
  Controls.Core -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Core/Debug/net10.0/Microsoft.Maui.Controls.dll
  VisualTestUtils -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/VisualTestUtils/Debug/netstandard2.0/VisualTestUtils.dll
  UITest.Core -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/UITest.Core/Debug/net10.0/UITest.Core.dll
  UITest.Appium -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/UITest.Appium/Debug/net10.0/UITest.Appium.dll
  VisualTestUtils.MagickNet -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/VisualTestUtils.MagickNet/Debug/netstandard2.0/VisualTestUtils.MagickNet.dll
  UITest.NUnit -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/UITest.NUnit/Debug/net10.0/UITest.NUnit.dll
  UITest.Analyzers -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/UITest.Analyzers/Debug/netstandard2.0/UITest.Analyzers.dll
  Controls.TestCases.iOS.Tests -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/Controls.TestCases.iOS.Tests.dll
Test run for /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/Controls.TestCases.iOS.Tests.dll (.NETCoreApp,Version=v10.0)
VSTest version 18.0.1 (arm64)

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
/Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/Controls.TestCases.iOS.Tests.dll
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.8.2+699d445a1a (64-bit .NET 10.0.0)
[xUnit.net 00:00:00.05]   Discovering: Controls.TestCases.iOS.Tests
[xUnit.net 00:00:00.15]   Discovered:  Controls.TestCases.iOS.Tests
NUnit Adapter 4.5.0.0: Test execution started
Running selected tests in /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/Controls.TestCases.iOS.Tests.dll
   NUnit3TestExecutor discovered 1 of 1 NUnit test cases using Current Discovery mode, Non-Explicit run
>>>>> 4/11/2026 5:36:43 AM FixtureSetup for Issue31480(iOS)
>>>>> 4/11/2026 5:36:47 AM FormattedTextToggleFlowDirectionTest Start
>>>>> 4/11/2026 5:36:50 AM FormattedTextToggleFlowDirectionTest Stop
>>>>> 4/11/2026 5:36:50 AM Log types: syslog, crashlog, performance, safariConsole, safariNetwork, server
  Failed FormattedTextToggleFlowDirectionTest [3 s]
  Error Message:
   VisualTestUtils.VisualTestFailedException : 
Baseline snapshot not yet created: /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/snapshots/ios/Issue81_ToggledBackLTR.png
Ensure new snapshot is correct:    /Users/cloudtest/vss/_work/1/a/Controls.TestCases.Shared.Tests/snapshots-diff/ios/Issue81_ToggledBackLTR.png
  and if it is, push a change to add it to the 'snapshots' directory.
See test attachment or download the build artifacts to get the new snapshot file.

More info: https://aka.ms/visual-test-workflow

  Stack Trace:
     at Microsoft.Maui.TestCases.Tests.Issues.Issue31480.FormattedTextToggleFlowDirectionTest() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue31480.cs:line 36
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

NUnit Adapter 4.5.0.0: Test execution complete

Test Run Failed.
Total tests: 1
     Failed: 1
 Total time: 21.4840 Seconds

⚠️ Issues found
  • LabelHandlerTests (FormattedTextHorizontalTextAlignmentAdjustsForFlowDirection) PASSED without fix (should fail) — tests don't catch the bug
  • LabelStub PASSED without fix (should fail) — tests don't catch the bug
  • LabelStub FAILED with fix (should pass)
    • Device tests: 9 of 5268 failed
  • Issue31480 FAILED with fix (should pass)
    • FormattedTextToggleFlowDirectionTest [3 s]
    • VisualTestUtils.VisualTestFailedException : Baseline snapshot not yet created: /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/snapshots/ios/Issue81_ToggledBac...
📁 Fix files reverted (3 files)
  • eng/pipelines/ci-copilot.yml
  • src/Controls/src/Core/Platform/iOS/Extensions/FormattedStringExtensions.cs
  • src/Core/src/Platform/iOS/FlowDirectionExtensions.cs

@MauiBot
Copy link
Copy Markdown
Collaborator

MauiBot commented Apr 5, 2026

🤖 AI Summary

👋 @jsuarezruiz — new AI review results are available. Please review the latest session below.

📊 Review Session03962b8 · Windows snapshots · 2026-04-11 13:39 UTC
🔍 Pre-Flight — Context & Validation

Issue: #31480 - RightToLeft does not apply for FormattedText
PR: #31498 - [iOS] Fix RightToLeft flow direction for FormattedText
Platforms Affected: iOS (primary), macOS/MacCatalyst
Files Changed: 2 implementation, 4 test (+6 snapshot images)

Key Findings

  • Root Cause: In FormattedStringExtensions.ToNSAttributedString(Span, ...), paragraph style alignment was hardcoded to LTR-only mappings (Start→Left, End→Right), ignoring the label's FlowDirection. Regressed in 9.0.50 SR5.
  • PR Fix Approach: Checks span.Parent is FormattedString && formattedString.Parent is Label to read FlowDirection from the parent label, then calls ToPlatformHorizontal(flowDirection.ToUIUserInterfaceLayoutDirection()).
  • CRITICAL BUG — MatchParent throws NotSupportedException: ToUIUserInterfaceLayoutDirection() has default: throw new NotSupportedException(...). FlowDirection.MatchParent is the default value for VisualElement.FlowDirectionProperty. Any label without an explicitly set flow direction will crash at runtime.
  • Device Test is Non-Testing: LabelStub.FormattedText is a plain auto-property. The fix only executes when span.Parent is FormattedString && formattedString.Parent is Label, but LabelStub doesn't set up parent relationships — so the device test exercises the old else branch and makes incorrect RTL assertions.
  • Missing iOS Snapshot: Test calls VerifyScreenshot for 3 states but only 2 iOS baselines exist — Issue81_ToggledBackLTR.png is absent for iOS, causing UI test failure.
  • Snapshot Naming Inconsistency: Snapshots use Issue81_* (referencing a different issue) instead of Issue31480_*.
  • Better Pattern Exists: LabelExtensions.cs line 36 uses platformLabel.EffectiveUserInterfaceLayoutDirection — a platform-resolved direction that handles MatchParent automatically. The PR bypasses this by re-reading from the MAUI model.
  • Prior Agent Review: Previous session flagged the MatchParent crash, missing snapshot, and incorrect device test. Gate ❌ FAILED.

Gate Result (Pre-Run)

Gate ❌ FAILED — tests did NOT behave as expected.

  • LabelHandlerTests FormattedTextHorizontalTextAlignmentAdjustsForFlowDirection: PASS without fix (expected FAIL) — test doesn't properly test the broken behavior
  • LabelStub: PASS without fix (expected FAIL), FAIL with fix
  • Issue31480 UITest: FAIL without fix (expected), FAIL with fix (bad — missing snapshot)

Fix Candidates

# Source Approach Test Result Files Changed Notes
PR PR #31498 Walk parent chain to get FlowDirection, call ToPlatformHorizontal with ToUIUserInterfaceLayoutDirection ❌ FAILED (Gate) FormattedStringExtensions.cs, FlowDirectionExtensions.cs MatchParent crash, missing snapshot, incorrect device test

🔧 Fix — Analysis & Comparison

Fix Candidates

# Source Approach Test Result Files Changed Notes
1 claude-opus-4.6 Pass FlowDirection parameter through call chain; treat MatchParent as LTR ✅ Pass (52/52) 1 file Clean; backward-compatible; MatchParent silently defaults to LTR
2 claude-sonnet-4.6 Use ((IVisualElementController)label).EffectiveFlowDirection.IsRightToLeft() at entry; pass bool isRTL down chain ✅ Pass (52/52) 1 file Correctly inherits MatchParent via MAUI's parent-resolution logic
3 gpt-5.3-codex Inject UILabel.EffectiveUserInterfaceLayoutDirection from LabelExtensions.UpdateText; add layout direction param ✅ Pass 2 files Uses platform direction; matches LabelExtensions pattern
4 gpt-5.4 Post-process attributed text alignment after assignment ❌ Fail 3 files Unrelated pre-existing test failure (FontStuffAfterTextTypeIsCorrect NullRef)
5 claude-opus-4.6 (R2) UITextAlignment.Natural for Start + parent walk for End ✅ Pass (52/52) 1 file Zero method signature changes; but still parent chain walk for End
PR PR #31498 Walk parent chain at span level; new ToUIUserInterfaceLayoutDirection extension ❌ FAILED (Gate) 2 files MatchParent crash; missing snapshot; incorrect device test

Cross-Pollination

Model Round New Ideas? Details
claude-opus-4.6 2 Yes NSTextAlignment.Natural for Start (became Attempt 5)
claude-sonnet-4.6 2 Yes NSParagraphStyle.BaseWritingDirection — refinement of Attempt 2, not run
gpt-5.3-codex 2 Yes Omit alignment for Start/End — risky, not run
gpt-5.4 2 Yes Fix no-op ToPlatformHorizontal(IView) overload — still requires parent access
claude-sonnet-4.6 3 No NO NEW IDEAS — solution space exhausted

Exhausted: Yes
Selected Fix: Candidate #2 (claude-sonnet-4.6) — Uses EffectiveFlowDirection.IsRightToLeft() which correctly handles MatchParent through MAUI's parent-resolution mechanism; 1 file change; most semantically correct; no method signature changes to public API


📋 Report — Final Recommendation

⚠️ Final Recommendation: REQUEST CHANGES

Phase Status

Phase Status Notes
Pre-Flight ✅ COMPLETE iOS regression in 9.0.50 SR5; MatchParent crash identified
Gate ❌ FAILED Missing iOS snapshot; device test non-testing; LabelHandlerTests passes without fix
Try-Fix ✅ COMPLETE 5 attempts, 4 passing (3 independent + 1 cross-pollination)
Report ✅ COMPLETE

Summary

PR #31498 correctly identifies and targets the root cause of the iOS RTL FormattedText regression (#31480), but its implementation has critical flaws that prevent it from passing validation. Three independent alternative fixes were found by multi-model exploration, all passing device tests in a single file change with no new extension methods required.

Root Cause

In FormattedStringExtensions.ToNSAttributedString(Span span, ...), paragraph style alignment was hardcoded as Start→UITextAlignment.Left and End→UITextAlignment.Right, ignoring the label's FlowDirection. This broke RTL text alignment for FormattedString while plain Label.Text (handled in LabelExtensions.cs) was unaffected.

Fix Quality

Critical issues with the PR's fix:

  1. FlowDirection.MatchParent crash — The PR adds ToUIUserInterfaceLayoutDirection() with a default: throw new NotSupportedException(...). FlowDirection.MatchParent is the default value of VisualElement.FlowDirectionProperty. Any label without an explicitly set FlowDirection (the vast majority) will throw at runtime.

  2. Device test exercises the wrong code pathLabelStub.FormattedText is a plain { get; set; } auto-property. The fix only executes when span.Parent is FormattedString && formattedString.Parent is Label, which requires the parent chain to be set up — LabelStub never does this. The device test silently exercises the old else branch, making its RTL assertions incorrect/misleading.

  3. Missing iOS snapshot — The UI test calls VerifyScreenshot for 3 states (Issue81_InitialLTR, Issue81_ToggledRTL, Issue81_ToggledBackLTR) but Issue81_ToggledBackLTR.png is absent from the iOS snapshots folder, causing the gate UI test to fail with fix applied.

  4. Snapshot naming inconsistency — Snapshots use Issue81_* naming (referencing an unrelated issue [Enhancement] Animation XAML Api #81) instead of Issue31480_*.

Better approach found (Candidate #2):

Use ((IVisualElementController)label).EffectiveFlowDirection.IsRightToLeft() at the Label.ToNSAttributedString() entry point, then pass bool isRTL through the internal call chain to the span method. This:

  • Correctly handles MatchParent via MAUI's own parent-resolution logic (no special-casing needed)
  • Changes only 1 file (FormattedStringExtensions.cs)
  • Requires no new extension methods
  • Doesn't break the public API surface

Comparison table:

PR Fix Best Alternative (Candidate #2)
MatchParent handling ❌ throws NotSupportedException ✅ resolved via MAUI parent chain
Files changed 2 1
New public API Yes (ToUIUserInterfaceLayoutDirection) No
Test correctness ❌ device test is non-testing needs device test fix
Snapshot complete ❌ missing iOS file n/a (separate concern)
Passes tests ❌ FAILED (Gate) ✅ 52/52 passed

Required Changes

  1. Replace parent-chain walk + ToUIUserInterfaceLayoutDirection with EffectiveFlowDirection.IsRightToLeft() at the Label.ToNSAttributedString() entry point and propagate bool isRTL down the internal chain
  2. Fix the device test — LabelStub must set up the Span.Parent → FormattedString.Parent → Label chain, OR test Label directly via its handler, to actually exercise the fix
  3. Add missing Issue81_ToggledBackLTR.png iOS snapshot (capture and commit the baseline)
  4. Consider renaming snapshots from Issue81_* to Issue31480_* for consistency

@MauiBot MauiBot added s/agent-review-incomplete AI agent could not complete all phases (blocker, timeout, error) and removed s/agent-changes-requested AI agent recommends changes - found a better alternative or issues labels Apr 10, 2026
@MauiBot MauiBot added s/agent-changes-requested AI agent recommends changes - found a better alternative or issues s/agent-fix-win AI found a better alternative fix than the PR and removed s/agent-review-incomplete AI agent could not complete all phases (blocker, timeout, error) labels Apr 11, 2026
@kubaflo
Copy link
Copy Markdown
Contributor

kubaflo commented Apr 12, 2026

Looks like this PR is no longer needed

@kubaflo kubaflo closed this Apr 12, 2026
@github-project-automation github-project-automation Bot moved this from Todo to Done in MAUI SDK Ongoing Apr 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-controls-label Label, Span platform/ios s/agent-changes-requested AI agent recommends changes - found a better alternative or issues s/agent-fix-win AI found a better alternative fix than the PR s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review) t/bug Something isn't working

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

RightToLeft does not apply for FormattedText

6 participants