Skip to content

[iOS] Fix RightToLeft flow direction for FormattedText#31498

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

[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

@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

📊 Expand Full Gate03962b8 · Windows snapshots

Gate Result: ❌ FAILED

Platform: IOS · Base: main · Merge base: 794a9fa6

Test Without Fix (expect FAIL) With Fix (expect PASS)
📱 LabelHandlerTests (FormattedTextHorizontalTextAlignmentAdjustsForFlowDirection) Category=Label ❌ PASS — 403s ✅ PASS — 161s
📱 LabelStub LabelStub ❌ PASS — 115s ❌ FAIL — 119s
🖥️ Issue31480 Issue31480 ✅ FAIL — 128s ❌ FAIL — 92s
🔴 Without fix — 📱 LabelHandlerTests (FormattedTextHorizontalTextAlignmentAdjustsForFlowDirection): PASS ❌ · 403s

(truncated to last 15,000 chars)

Specific + 572
�[40m�[37mdbug�[39m�[22m�[49m: frame #7: 0x000000019783cc78 Foundation`-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212
�[40m�[37mdbug�[39m�[22m�[49m: frame #8: 0x00000001978b03a4 Foundation`-[NSRunLoop(NSRunLoop) runUntilDate:] + 100
�[40m�[37mdbug�[39m�[22m�[49m: frame #9: 0x00000001001cef28 mlaunch`xamarin_dyn_objc_msgSend + 160
�[40m�[37mdbug�[39m�[22m�[49m: frame #10: 0x00000001039f96c4
�[40m�[37mdbug�[39m�[22m�[49m: frame #11: 0x0000000103c520c8
�[40m�[37mdbug�[39m�[22m�[49m: frame #12: 0x00000001039f303c
�[40m�[37mdbug�[39m�[22m�[49m: frame #13: 0x00000001038710b4
�[40m�[37mdbug�[39m�[22m�[49m: frame #14: 0x000000010308cd54
�[40m�[37mdbug�[39m�[22m�[49m: frame #15: 0x0000000101f28c04 libcoreclr.dylib`CallDescrWorkerInternal + 132
�[40m�[37mdbug�[39m�[22m�[49m: frame #16: 0x0000000101da6d30 libcoreclr.dylib`MethodDescCallSite::CallTargetWorker(unsigned long long const*, unsigned long long*, int) + 836
�[40m�[37mdbug�[39m�[22m�[49m: frame #17: 0x0000000101cad350 libcoreclr.dylib`RunMain(MethodDesc*, short, int*, PtrArray**) + 648
�[40m�[37mdbug�[39m�[22m�[49m: frame #18: 0x0000000101cad688 libcoreclr.dylib`Assembly::ExecuteMainMethod(PtrArray**, int) + 264
�[40m�[37mdbug�[39m�[22m�[49m: frame #19: 0x0000000101cd529c libcoreclr.dylib`CorHost2::ExecuteAssembly(unsigned int, char16_t const*, int, char16_t const**, unsigned int*) + 640
�[40m�[37mdbug�[39m�[22m�[49m: frame #20: 0x0000000101c9b650 libcoreclr.dylib`coreclr_execute_assembly + 232
�[40m�[37mdbug�[39m�[22m�[49m: frame #21: 0x00000001001ca140 mlaunch`mono_jit_exec + 204
�[40m�[37mdbug�[39m�[22m�[49m: frame #22: 0x00000001001cdecc mlaunch`xamarin_main + 884
�[40m�[37mdbug�[39m�[22m�[49m: frame #23: 0x00000001001cf1f4 mlaunch`main + 64
�[40m�[37mdbug�[39m�[22m�[49m: frame #24: 0x0000000195de2b98 dyld`start + 6076
�[40m�[37mdbug�[39m�[22m�[49m: thread #2
�[40m�[37mdbug�[39m�[22m�[49m: frame #0: 0x00000001961438b0 libsystem_kernel.dylib`__workq_kernreturn + 8
�[40m�[37mdbug�[39m�[22m�[49m: thread #3
�[40m�[37mdbug�[39m�[22m�[49m: frame #0: 0x00000001961438b0 libsystem_kernel.dylib`__workq_kernreturn + 8
�[40m�[37mdbug�[39m�[22m�[49m: thread #4
�[40m�[37mdbug�[39m�[22m�[49m: frame #0: 0x0000000196141c34 libsystem_kernel.dylib`mach_msg2_trap + 8
�[40m�[37mdbug�[39m�[22m�[49m: frame #1: 0x00000001961543a0 libsystem_kernel.dylib`mach_msg2_internal + 76
�[40m�[37mdbug�[39m�[22m�[49m: frame #2: 0x000000019614a764 libsystem_kernel.dylib`mach_msg_overwrite + 484
�[40m�[37mdbug�[39m�[22m�[49m: frame #3: 0x0000000196141fa8 libsystem_kernel.dylib`mach_msg + 24
�[40m�[37mdbug�[39m�[22m�[49m: frame #4: 0x0000000101c992f4 libcoreclr.dylib`MachMessage::Receive(unsigned int) + 80
�[40m�[37mdbug�[39m�[22m�[49m: frame #5: 0x0000000101c9861c libcoreclr.dylib`SEHExceptionThread(void*) + 164
�[40m�[37mdbug�[39m�[22m�[49m: frame #6: 0x0000000196183bc8 libsystem_pthread.dylib`_pthread_start + 136
�[40m�[37mdbug�[39m�[22m�[49m: thread #5, name = '.NET SynchManager'
�[40m�[37mdbug�[39m�[22m�[49m: frame #0: 0x0000000196147d04 libsystem_kernel.dylib`kevent + 8
�[40m�[37mdbug�[39m�[22m�[49m: frame #1: 0x0000000101c8d304 libcoreclr.dylib`CorUnix::CPalSynchronizationManager::ReadBytesFromProcessPipe(int, unsigned char*, int) + 484
�[40m�[37mdbug�[39m�[22m�[49m: frame #2: 0x0000000101c8c9f0 libcoreclr.dylib`CorUnix::CPalSynchronizationManager::WorkerThread(void*) + 164
�[40m�[37mdbug�[39m�[22m�[49m: frame #3: 0x0000000101c960fc libcoreclr.dylib`CorUnix::CPalThread::ThreadEntry(void*) + 364
�[40m�[37mdbug�[39m�[22m�[49m: frame #4: 0x0000000196183bc8 libsystem_pthread.dylib`_pthread_start + 136
�[40m�[37mdbug�[39m�[22m�[49m: thread #6, name = '.NET EventPipe'
�[40m�[37mdbug�[39m�[22m�[49m: frame #0: 0x000000019614a498 libsystem_kernel.dylib`poll + 8
�[40m�[37mdbug�[39m�[22m�[49m: frame #1: 0x0000000101f88e90 libcoreclr.dylib`ds_ipc_poll(_DiagnosticsIpcPollHandle*, unsigned long, unsigned int, void (*)(char const*, unsigned int)) + 172
�[40m�[37mdbug�[39m�[22m�[49m: frame #2: 0x0000000102036bb0 libcoreclr.dylib`ds_ipc_stream_factory_get_next_available_stream(void (*)(char const*, unsigned int)) + 756
�[40m�[37mdbug�[39m�[22m�[49m: frame #3: 0x0000000102034a68 libcoreclr.dylib`server_thread(void*) + 372
�[40m�[37mdbug�[39m�[22m�[49m: frame #4: 0x0000000101c960fc libcoreclr.dylib`CorUnix::CPalThread::ThreadEntry(void*) + 364
�[40m�[37mdbug�[39m�[22m�[49m: frame #5: 0x0000000196183bc8 libsystem_pthread.dylib`_pthread_start + 136
�[40m�[37mdbug�[39m�[22m�[49m: thread #7, name = '.NET DebugPipe'
�[40m�[37mdbug�[39m�[22m�[49m: frame #0: 0x0000000196142678 libsystem_kernel.dylib`__open + 8
�[40m�[37mdbug�[39m�[22m�[49m: frame #1: 0x000000019614d6a4 libsystem_kernel.dylib`open + 64
�[40m�[37mdbug�[39m�[22m�[49m: frame #2: 0x0000000101f89a84 libcoreclr.dylib`TwoWayPipe::WaitForConnection() + 40
�[40m�[37mdbug�[39m�[22m�[49m: frame #3: 0x0000000101f84578 libcoreclr.dylib`DbgTransportSession::TransportWorker() + 232
�[40m�[37mdbug�[39m�[22m�[49m: frame #4: 0x0000000101f835c8 libcoreclr.dylib`DbgTransportSession::TransportWorkerStatic(void*) + 40
�[40m�[37mdbug�[39m�[22m�[49m: frame #5: 0x0000000101c960fc libcoreclr.dylib`CorUnix::CPalThread::ThreadEntry(void*) + 364
�[40m�[37mdbug�[39m�[22m�[49m: frame #6: 0x0000000196183bc8 libsystem_pthread.dylib`_pthread_start + 136
�[40m�[37mdbug�[39m�[22m�[49m: thread #8, name = '.NET Debugger'
�[40m�[37mdbug�[39m�[22m�[49m: frame #0: 0x00000001961453cc libsystem_kernel.dylib`__psynch_cvwait + 8
�[40m�[37mdbug�[39m�[22m�[49m: frame #1: 0x000000019618409c libsystem_pthread.dylib`_pthread_cond_wait + 984
�[40m�[37mdbug�[39m�[22m�[49m: frame #2: 0x0000000101c8af6c libcoreclr.dylib`CorUnix::CPalSynchronizationManager::ThreadNativeWait(CorUnix::_ThreadNativeWaitData*, unsigned int, CorUnix::ThreadWakeupReason*, unsigned int*) + 320
�[40m�[37mdbug�[39m�[22m�[49m: frame #3: 0x0000000101c8abec libcoreclr.dylib`CorUnix::CPalSynchronizationManager::BlockThread(CorUnix::CPalThread*, unsigned int, bool, bool, CorUnix::ThreadWakeupReason*, unsigned int*) + 380
�[40m�[37mdbug�[39m�[22m�[49m: frame #4: 0x0000000101c8f0cc libcoreclr.dylib`CorUnix::InternalWaitForMultipleObjectsEx(CorUnix::CPalThread*, unsigned int, void* const*, int, unsigned int, int, int) + 1600
�[40m�[37mdbug�[39m�[22m�[49m: frame #5: 0x0000000101f81da8 libcoreclr.dylib`DebuggerRCThread::MainLoop() + 228
�[40m�[37mdbug�[39m�[22m�[49m: frame #6: 0x0000000101f81c70 libcoreclr.dylib`DebuggerRCThread::ThreadProc() + 256
�[40m�[37mdbug�[39m�[22m�[49m: frame #7: 0x0000000101f81a24 libcoreclr.dylib`DebuggerRCThread::ThreadProcStatic(void*) + 56
�[40m�[37mdbug�[39m�[22m�[49m: frame #8: 0x0000000101c960fc libcoreclr.dylib`CorUnix::CPalThread::ThreadEntry(void*) + 364
�[40m�[37mdbug�[39m�[22m�[49m: frame #9: 0x0000000196183bc8 libsystem_pthread.dylib`_pthread_start + 136
�[40m�[37mdbug�[39m�[22m�[49m: thread #9
�[40m�[37mdbug�[39m�[22m�[49m: frame #0: 0x00000001961453cc libsystem_kernel.dylib`__psynch_cvwait + 8
�[40m�[37mdbug�[39m�[22m�[49m: frame #1: 0x000000019618409c libsystem_pthread.dylib`_pthread_cond_wait + 984
�[40m�[37mdbug�[39m�[22m�[49m: frame #2: 0x0000000101c8af6c libcoreclr.dylib`CorUnix::CPalSynchronizationManager::ThreadNativeWait(CorUnix::_ThreadNativeWaitData*, unsigned int, CorUnix::ThreadWakeupReason*, unsigned int*) + 320
�[40m�[37mdbug�[39m�[22m�[49m: frame #3: 0x0000000101c8abec libcoreclr.dylib`CorUnix::CPalSynchronizationManager::BlockThread(CorUnix::CPalThread*, unsigned int, bool, bool, CorUnix::ThreadWakeupReason*, unsigned int*) + 380
�[40m�[37mdbug�[39m�[22m�[49m: frame #4: 0x0000000101c8f0cc libcoreclr.dylib`CorUnix::InternalWaitForMultipleObjectsEx(CorUnix::CPalThread*, unsigned int, void* const*, int, unsigned int, int, int) + 1600
�[40m�[37mdbug�[39m�[22m�[49m: frame #5: 0x0000000101ddc078 libcoreclr.dylib`FinalizerThread::WaitForFinalizerEvent(CLREvent*) + 240
�[40m�[37mdbug�[39m�[22m�[49m: frame #6: 0x0000000101ddc1d8 libcoreclr.dylib`FinalizerThread::FinalizerThreadWorker(void*) + 264
�[40m�[37mdbug�[39m�[22m�[49m: frame #7: 0x0000000101d79fa8 libcoreclr.dylib`ManagedThreadBase_DispatchOuter(ManagedThreadCallState*) + 248
�[40m�[37mdbug�[39m�[22m�[49m: frame #8: 0x0000000101d7a48c libcoreclr.dylib`ManagedThreadBase::FinalizerBase(void (*)(void*)) + 36
�[40m�[37mdbug�[39m�[22m�[49m: frame #9: 0x0000000101ddc350 libcoreclr.dylib`FinalizerThread::FinalizerThreadStart(void*) + 88
�[40m�[37mdbug�[39m�[22m�[49m: frame #10: 0x0000000101c960fc libcoreclr.dylib`CorUnix::CPalThread::ThreadEntry(void*) + 364
�[40m�[37mdbug�[39m�[22m�[49m: frame #11: 0x0000000196183bc8 libsystem_pthread.dylib`_pthread_start + 136
�[40m�[37mdbug�[39m�[22m�[49m: thread #10, name = '.NET SigHandler'
�[40m�[37mdbug�[39m�[22m�[49m: frame #0: 0x00000001961427dc libsystem_kernel.dylib`read + 8
�[40m�[37mdbug�[39m�[22m�[49m: frame #1: 0x000000010035ce98 libSystem.Native.dylib`SignalHandlerLoop + 96
�[40m�[37mdbug�[39m�[22m�[49m: frame #2: 0x0000000196183bc8 libsystem_pthread.dylib`_pthread_start + 136
�[40m�[37mdbug�[39m�[22m�[49m: thread #11
�[40m�[37mdbug�[39m�[22m�[49m: frame #0: 0x0000000196147d04 libsystem_kernel.dylib`kevent + 8
�[40m�[37mdbug�[39m�[22m�[49m: frame #1: 0x000000010035b4a4 libSystem.Native.dylib`SystemNative_WaitForSocketEvents + 80
�[40m�[37mdbug�[39m�[22m�[49m: frame #2: 0x00000001039fbb9c
�[40m�[37mdbug�[39m�[22m�[49m: frame #3: 0x00000001039fb8dc
�[40m�[37mdbug�[39m�[22m�[49m: frame #4: 0x00000001039fb804
�[40m�[37mdbug�[39m�[22m�[49m: frame #5: 0x00000001038d1350
�[40m�[37mdbug�[39m�[22m�[49m: frame #6: 0x00000001038d11e0
�[40m�[37mdbug�[39m�[22m�[49m: frame #7: 0x00000001038d1108
�[40m�[37mdbug�[39m�[22m�[49m: frame #8: 0x0000000101f28c04 libcoreclr.dylib`CallDescrWorkerInternal + 132
�[40m�[37mdbug�[39m�[22m�[49m: frame #9: 0x0000000101da6988 libcoreclr.dylib`DispatchCallSimple(unsigned long*, unsigned int, unsigned long long, unsigned int) + 268
�[40m�[37mdbug�[39m�[22m�[49m: frame #10: 0x0000000101db8c6c libcoreclr.dylib`ThreadNative::KickOffThread_Worker(void*) + 148
�[40m�[37mdbug�[39m�[22m�[49m: frame #11: 0x0000000101d79fa8 libcoreclr.dylib`ManagedThreadBase_DispatchOuter(ManagedThreadCallState*) + 248
�[40m�[37mdbug�[39m�[22m�[49m: frame #12: 0x0000000101d7a45c libcoreclr.dylib`ManagedThreadBase::KickOff(void (*)(void*), void*) + 32
�[40m�[37mdbug�[39m�[22m�[49m: frame #13: 0x0000000101db8d44 libcoreclr.dylib`ThreadNative::KickOffThread(void*) + 172
�[40m�[37mdbug�[39m�[22m�[49m: frame #14: 0x0000000101c960fc libcoreclr.dylib`CorUnix::CPalThread::ThreadEntry(void*) + 364
�[40m�[37mdbug�[39m�[22m�[49m: frame #15: 0x0000000196183bc8 libsystem_pthread.dylib`_pthread_start + 136
�[40m�[37mdbug�[39m�[22m�[49m: thread #12
�[40m�[37mdbug�[39m�[22m�[49m: frame #0: 0x0000000196141c34 libsystem_kernel.dylib`mach_msg2_trap + 8
�[40m�[37mdbug�[39m�[22m�[49m: frame #1: 0x00000001961543a0 libsystem_kernel.dylib`mach_msg2_internal + 76
�[40m�[37mdbug�[39m�[22m�[49m: frame #2: 0x000000019614a764 libsystem_kernel.dylib`mach_msg_overwrite + 484
�[40m�[37mdbug�[39m�[22m�[49m: frame #3: 0x0000000196141fa8 libsystem_kernel.dylib`mach_msg + 24
�[40m�[37mdbug�[39m�[22m�[49m: frame #4: 0x000000019626ec0c CoreFoundation`__CFRunLoopServiceMachPort + 160
�[40m�[37mdbug�[39m�[22m�[49m: frame #5: 0x000000019626d528 CoreFoundation`__CFRunLoopRun + 1208
�[40m�[37mdbug�[39m�[22m�[49m: frame #6: 0x000000019626c9e8 CoreFoundation`CFRunLoopRunSpecific + 572
�[40m�[37mdbug�[39m�[22m�[49m: frame #7: 0x000000019783cc78 Foundation`-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212
�[40m�[37mdbug�[39m�[22m�[49m: frame #8: 0x00000001001cef28 mlaunch`xamarin_dyn_objc_msgSend + 160
�[40m�[37mdbug�[39m�[22m�[49m: frame #9: 0x0000000103c47f1c
�[40m�[37mdbug�[39m�[22m�[49m: frame #10: 0x0000000103c47de0
�[40m�[37mdbug�[39m�[22m�[49m: frame #11: 0x0000000103c47c14
�[40m�[37mdbug�[39m�[22m�[49m: frame #12: 0x0000000103c44810
�[40m�[37mdbug�[39m�[22m�[49m: frame #13: 0x00000001038d12f8
�[40m�[37mdbug�[39m�[22m�[49m: frame #14: 0x00000001038d11e0
�[40m�[37mdbug�[39m�[22m�[49m: frame #15: 0x00000001038d1108
�[40m�[37mdbug�[39m�[22m�[49m: frame #16: 0x0000000101f28c04 libcoreclr.dylib`CallDescrWorkerInternal + 132
�[40m�[37mdbug�[39m�[22m�[49m: frame #17: 0x0000000101da6988 libcoreclr.dylib`DispatchCallSimple(unsigned long*, unsigned int, unsigned long long, unsigned int) + 268
�[40m�[37mdbug�[39m�[22m�[49m: frame #18: 0x0000000101db8c6c libcoreclr.dylib`ThreadNative::KickOffThread_Worker(void*) + 148
�[40m�[37mdbug�[39m�[22m�[49m: frame #19: 0x0000000101d79fa8 libcoreclr.dylib`ManagedThreadBase_DispatchOuter(ManagedThreadCallState*) + 248
�[40m�[37mdbug�[39m�[22m�[49m: frame #20: 0x0000000101d7a45c libcoreclr.dylib`ManagedThreadBase::KickOff(void (*)(void*), void*) + 32
�[40m�[37mdbug�[39m�[22m�[49m: frame #21: 0x0000000101db8d44 libcoreclr.dylib`ThreadNative::KickOffThread(void*) + 172
�[40m�[37mdbug�[39m�[22m�[49m: frame #22: 0x0000000101c960fc libcoreclr.dylib`CorUnix::CPalThread::ThreadEntry(void*) + 364
�[40m�[37mdbug�[39m�[22m�[49m: frame #23: 0x0000000196183bc8 libsystem_pthread.dylib`_pthread_start + 136
�[40m�[37mdbug�[39m�[22m�[49m: thread #13
�[40m�[37mdbug�[39m�[22m�[49m: frame #0: 0x0000000000000000
�[40m�[37mdbug�[39m�[22m�[49m: thread #14, name = 'com.apple.CFSocket.private'
�[40m�[37mdbug�[39m�[22m�[49m: frame #0: 0x000000019614cc2c libsystem_kernel.dylib`__select + 8
�[40m�[37mdbug�[39m�[22m�[49m: frame #1: 0x0000000196294a80 CoreFoundation`__CFSocketManager + 704
�[40m�[37mdbug�[39m�[22m�[49m: frame #2: 0x0000000196183bc8 libsystem_pthread.dylib`_pthread_start + 136
�[40m�[37mdbug�[39m�[22m�[49m: (lldb) detach
�[40m�[37mdbug�[39m�[22m�[49m: Process 9405 detached
�[40m�[37mdbug�[39m�[22m�[49m: (lldb) quit
�[40m�[37mdbug�[39m�[22m�[49m: 9405 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 ✅ · 161s
  Determining projects to restore...
  Restored /Users/cloudtest/vss/_work/1/s/src/Controls/src/BindingSourceGen/Controls.BindingSourceGen.csproj (in 327 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Graphics/src/Graphics/Graphics.csproj (in 341 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Essentials/src/Essentials.csproj (in 347 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Core/src/Core.csproj (in 381 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Controls/src/Xaml/Controls.Xaml.csproj (in 380 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Controls/src/Core/Controls.Core.csproj (in 395 ms).
  5 of 11 projects are up-to-date for restore.
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13749556
  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.13749556
  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.13749556
  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.13749556
  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.13749556
  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:20.21
[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 108B2B61-0C6B-47B5-BC03-A841EBA0F4E2 -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 108B2B61-0C6B-47B5-BC03-A841EBA0F4E2
�[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-20260405_044657.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.55 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/tmpZRF4OW.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 (108B2B61-0C6B-47B5-BC03-A841EBA0F4E2) by executing 'xcrun simctl install 108B2B61-0C6B-47B5-BC03-A841EBA0F4E2 /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:53039
�[40m�[37mdbug�[39m�[22m�[49m: System log for the 'iPhone 11 Pro' simulator is: /Users/cloudtest/Library/Logs/CoreSimulator/108B2B61-0C6B-47B5-BC03-A841EBA0F4E2/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:53058 saving logs to /Users/cloudtest/vss/_work/1/s/artifacts/log/test-ios-simulator-64_18.6-20260405_044659.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/108B2B61-0C6B-47B5-BC03-A841EBA0F4E2/data/Containers/Data/Application/5C86D0E4-5B7E-4F02-8241-938B0D1C1DE2/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: 2742
  Failed: 0
  Tests completed successfully

🔴 Without fix — 📱 LabelStub: PASS ❌ · 115s
  Determining projects to restore...
  All projects are up-to-date for restore.
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13749556
  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.13749556
  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.13749556
  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.13749556
  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.13749556
  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.57
[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 108B2B61-0C6B-47B5-BC03-A841EBA0F4E2 -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 108B2B61-0C6B-47B5-BC03-A841EBA0F4E2
�[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-20260405_044039.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.55 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/tmpXYwnTv.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 (108B2B61-0C6B-47B5-BC03-A841EBA0F4E2) by executing 'xcrun simctl install 108B2B61-0C6B-47B5-BC03-A841EBA0F4E2 /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:54078
�[40m�[37mdbug�[39m�[22m�[49m: System log for the 'iPhone 11 Pro' simulator is: /Users/cloudtest/Library/Logs/CoreSimulator/108B2B61-0C6B-47B5-BC03-A841EBA0F4E2/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:54094 saving logs to /Users/cloudtest/vss/_work/1/s/artifacts/log/test-ios-simulator-64_18.6-20260405_044043.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/108B2B61-0C6B-47B5-BC03-A841EBA0F4E2/data/Containers/Data/Application/049B773B-60F8-4F8C-B3D4-341846168B9F/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: 2558 Passed: 2518 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: 2630
  Failed: 0
  Tests completed successfully

🟢 With fix — 📱 LabelStub: FAIL ❌ · 119s
  Determining projects to restore...
  All projects are up-to-date for restore.
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13749556
  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.13749556
  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.13749556
  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.13749556
  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.13749556
  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.41
[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 108B2B61-0C6B-47B5-BC03-A841EBA0F4E2 -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 108B2B61-0C6B-47B5-BC03-A841EBA0F4E2
�[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-20260405_044723.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.55 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/tmp5hS7r5.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 (108B2B61-0C6B-47B5-BC03-A841EBA0F4E2) by executing 'xcrun simctl install 108B2B61-0C6B-47B5-BC03-A841EBA0F4E2 /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:53269
�[40m�[37mdbug�[39m�[22m�[49m: System log for the 'iPhone 11 Pro' simulator is: /Users/cloudtest/Library/Logs/CoreSimulator/108B2B61-0C6B-47B5-BC03-A841EBA0F4E2/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:53285 saving logs to /Users/cloudtest/vss/_work/1/s/artifacts/log/test-ios-simulator-64_18.6-20260405_044728.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/108B2B61-0C6B-47B5-BC03-A841EBA0F4E2/data/Containers/Data/Application/42F88C1F-2F2B-42BB-8301-32DA3A62170C/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: 2558 Passed: 2515 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: 5257
  Failed: 9
  Tests completed with exit code: 1

🔴 Without fix — 🖥️ Issue31480: FAIL ✅ · 128s
  Determining projects to restore...
  Restored /Users/cloudtest/vss/_work/1/s/src/Controls/src/BindingSourceGen/Controls.BindingSourceGen.csproj (in 571 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Graphics/src/Graphics/Graphics.csproj (in 579 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Essentials/src/Essentials.csproj (in 794 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Core/src/Core.csproj (in 1.07 sec).
  Restored /Users/cloudtest/vss/_work/1/s/src/Controls/src/Xaml/Controls.Xaml.csproj (in 1.07 sec).
  Restored /Users/cloudtest/vss/_work/1/s/src/Controls/src/Core/Controls.Core.csproj (in 1.09 sec).
  Restored /Users/cloudtest/vss/_work/1/s/src/Controls/Foldable/src/Controls.Foldable.csproj (in 1.16 sec).
  Restored /Users/cloudtest/vss/_work/1/s/src/Core/maps/src/Maps.csproj (in 1.3 sec).
  Restored /Users/cloudtest/vss/_work/1/s/src/Controls/Maps/src/Controls.Maps.csproj (in 1.3 sec).
  Restored /Users/cloudtest/vss/_work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj (in 2.21 sec).
  Restored /Users/cloudtest/vss/_work/1/s/src/BlazorWebView/src/Maui/Microsoft.AspNetCore.Components.WebView.Maui.csproj (in 2.22 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.13749556
  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.13749556
  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.13749556
  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.13749556
  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.13749556
  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.13749556
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13749556
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13749556
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13749556
  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
  Controls.Maps -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Maps/Debug/net10.0-ios26.0/Microsoft.Maui.Controls.Maps.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:47.30
  Determining projects to restore...
  Restored /Users/cloudtest/vss/_work/1/s/src/TestUtils/src/UITest.Core/UITest.Core.csproj (in 708 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Controls/tests/CustomAttributes/Controls.CustomAttributes.csproj (in 708 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Controls/src/BindingSourceGen/Controls.BindingSourceGen.csproj (in 708 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Graphics/src/Graphics/Graphics.csproj (in 708 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/TestUtils/src/VisualTestUtils/VisualTestUtils.csproj (in 0.8 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Essentials/src/Essentials.csproj (in 827 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Controls/src/Core/Controls.Core.csproj (in 1.01 sec).
  Restored /Users/cloudtest/vss/_work/1/s/src/Core/src/Core.csproj (in 1.03 sec).
  Restored /Users/cloudtest/vss/_work/1/s/src/TestUtils/src/UITest.NUnit/UITest.NUnit.csproj (in 1.38 sec).
  Restored /Users/cloudtest/vss/_work/1/s/src/TestUtils/src/UITest.Appium/UITest.Appium.csproj (in 1.03 sec).
  Restored /Users/cloudtest/vss/_work/1/s/src/TestUtils/src/UITest.Analyzers/UITest.Analyzers.csproj (in 2.39 sec).
  Restored /Users/cloudtest/vss/_work/1/s/src/TestUtils/src/VisualTestUtils.MagickNet/VisualTestUtils.MagickNet.csproj (in 2.6 sec).
  Restored /Users/cloudtest/vss/_work/1/s/src/Controls/tests/TestCases.iOS.Tests/Controls.TestCases.iOS.Tests.csproj (in 2.62 sec).
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13749556
  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.13749556
  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.13749556
  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.13749556
  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
  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.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.04]   Discovering: Controls.TestCases.iOS.Tests
[xUnit.net 00:00:00.13]   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/5/2026 4:44:18 AM FixtureSetup for Issue31480(iOS)
>>>>> 4/5/2026 4:44:21 AM FormattedTextToggleFlowDirectionTest Start
>>>>> 4/5/2026 4:44:26 AM FormattedTextToggleFlowDirectionTest Stop
>>>>> 4/5/2026 4:44:26 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

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

🟢 With fix — 🖥️ Issue31480: FAIL ❌ · 92s
  Determining projects to restore...
  Restored /Users/cloudtest/vss/_work/1/s/src/Controls/src/BindingSourceGen/Controls.BindingSourceGen.csproj (in 426 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Graphics/src/Graphics/Graphics.csproj (in 444 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Essentials/src/Essentials.csproj (in 452 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Core/src/Core.csproj (in 494 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Controls/src/Xaml/Controls.Xaml.csproj (in 494 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Controls/src/Core/Controls.Core.csproj (in 508 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.13749556
  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.13749556
  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.13749556
  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.13749556
  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.13749556
  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.13749556
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13749556
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13749556
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13749556
  Controls.Foldable -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Foldable/Debug/net10.0-ios26.0/Microsoft.Maui.Controls.Foldable.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.Maps -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.Maps/Debug/net10.0-ios26.0/Microsoft.Maui.Controls.Maps.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:43.48
  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/Essentials/src/Essentials.csproj (in 411 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Graphics/src/Graphics/Graphics.csproj (in 443 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Core/src/Core.csproj (in 448 ms).
  Restored /Users/cloudtest/vss/_work/1/s/src/Controls/src/Core/Controls.Core.csproj (in 474 ms).
  8 of 13 projects are up-to-date for restore.
  ##vso[build.updatebuildnumber]10.0.60-ci+azdo.13749556
  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.13749556
  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.13749556
  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.13749556
  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.Appium -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/UITest.Appium/Debug/net10.0/UITest.Appium.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.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.04]   Discovering: Controls.TestCases.iOS.Tests
[xUnit.net 00:00:00.13]   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/5/2026 4:50:32 AM FixtureSetup for Issue31480(iOS)
>>>>> 4/5/2026 4:50:36 AM FormattedTextToggleFlowDirectionTest Start
>>>>> 4/5/2026 4:50:39 AM FormattedTextToggleFlowDirectionTest Stop
>>>>> 4/5/2026 4:50:39 AM Log types: syslog, crashlog, performance, safariConsole, safariNetwork, server
  Failed FormattedTextToggleFlowDirectionTest [2 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: 19.6222 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 5266 failed
  • Issue31480 FAILED with fix (should pass)
    • FormattedTextToggleFlowDirectionTest [2 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

📊 Expand Full Review03962b8 · Windows snapshots
🔍 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.
  • Fix Approach: PR checks the span's parent chain (span.Parent is FormattedString && formattedString.Parent is Label) to get the label's FlowDirection, then calls ToPlatformHorizontal(flowDirection.ToUIUserInterfaceLayoutDirection()) to flip alignment for RTL.
  • Critical Bug — MatchParent throws NotSupportedException: ToUIUserInterfaceLayoutDirection() has default: throw new NotSupportedException(...). FlowDirection.MatchParent is the default value for VisualElement.FlowDirectionProperty. Any label whose FlowDirection is not explicitly set (which is the common case) will crash at runtime when FlowDirection.MatchParent hits the switch.
  • Device Test is Non-Testing: LabelStub.FormattedText is a plain auto-property that doesn't set parent references on the FormattedString. The fix only runs when span.Parent is FormattedString && formattedString.Parent is Label parentLabel, which will never be true for LabelStub. The device test exercises the else (old/unfixed) code path, making the RTL assertions incorrect/misleading.
  • Missing iOS Snapshot: Test calls VerifyScreenshot for 3 states (Issue81_InitialLTR, Issue81_ToggledRTL, Issue81_ToggledBackLTR), but only 2 iOS baseline snapshots exist. Issue81_ToggledBackLTR.png is absent for iOS, causing the Gate test to fail.
  • Snapshot File Naming Inconsistency: Snapshots use Issue81_* naming pattern (referencing an entirely different issue [Enhancement] Animation XAML Api #81) rather than Issue31480_*.
  • Better Pattern Available: The existing codebase pattern (LabelExtensions, TextViewExtensions, TextFieldExtensions) uses platformView.EffectiveUserInterfaceLayoutDirection — a platform-resolved direction that automatically handles MatchParent. The PR's approach bypasses this by re-reading from the MAUI model.
  • Prior Agent Review: Previous agent flagged MatchParent crash, missing snapshot, and incorrect device test. Gate failed due to missing snapshot. Labels include s/agent-changes-requested.

Edge Cases from Comments

  • Workaround users have: explicitly set TextAlignment.End on iOS for RTL labels (issue commenter's workaround).
  • Issue confirmed reproducible from 9.0.50 SR5 (not 9.0.40 SR4).

Fix Candidates

# Source Approach Test Result Files Changed Notes
PR PR #31498 Check parent Label's FlowDirection via parent chain walk in Span.ToNSAttributedString ❌ FAILED (Gate) FormattedStringExtensions.cs, FlowDirectionExtensions.cs Missing iOS snapshot; MatchParent crash; device test doesn't test fix path

🔧 Fix — Analysis & Comparison

Fix Candidates

# Source Approach Test Result Files Changed Notes
1 try-fix (claude-opus-4.6) Thread as explicit parameter through all overloads; resolve from in PASS 2 files (FormattedStringExtensions.cs, LabelExtensions.cs) No MatchParent crash; consistent with existing pattern; adds params to public API
2 try-fix (claude-sonnet-4.6) Pre-resolve alignment at entry-point by swapping End when ; no new params Start PASS 1 file (FormattedStringExtensions.cs) Minimal; uses raw doesn't handle MatchParent correctly
3 try-fix (gpt-5.3-codex) Use UITextAlignment.Natural for Start/default in `Span. FAIL 1 file Incompatible with test expectations (test expects absolute Left/Right) ToNSAttributedString`
4 try-fix (gpt-5.4) Keep PR's parent chain + resolve FlowDirection.MatchParent by walking ancestor FAIL 2 files Compile error; test infra issue prevented verification tree
5 try-fix (claude-sonnet-4.6, cross-poll) At entry-point, cast to , check , swap End Start PASS 1 file (FormattedStringExtensions.cs) Best: uses MAUI's resolved direction; handles MatchParent; minimal 1-file change
PR PR #31498 Walk parent chain to get Label.FlowDirection; added ToUIUserInterfaceLayoutDirection() FAILED (Gate) 2 files Missing iOS snapshot; MatchParent crash; device test doesn't exercise fix path extension

Cross-Pollination

Model Round New Ideas? Details
claude-opus-4.6 2 No NO NEW IDEAS
Attempt 5 Use IFlowDirectionController.EffectiveFlowDirection at entry-point
gpt-5.3-codex 2 Yes (not run) NSMutableParagraphStyle. similar to failed Attempt 3
gpt-5.4 2 Yes (not run) Force re-materialize FormattedText on FlowDirection complex, different lifecycle

Exhausted: all models queried; new ideas either tried (Attempt 5 PASS) or impracticalYes
Selected Fix: Attempt 5 (IFlowDirectionController.EffectiveFlowDirection at entry- semantically correct, minimal 1-file change, handles MatchParent via MAUI's resolved direction APIpoint)


📋 Report — Final Recommendation

⚠️ Final Recommendation: REQUEST CHANGES

Phase Status

Phase Status Notes
Pre-Flight ✅ COMPLETE Issue #31480, iOS regression in 9.0.50 SR5
Gate ❌ FAILED iOS — missing Issue81_ToggledBackLTR.png snapshot
Try-Fix ✅ COMPLETE 5 attempts (3 passing); best fix identified
Report ✅ COMPLETE

Summary

PR #31498 fixes a real iOS regression (FormattedText ignoring FlowDirection.RightToLeft) but has critical bugs that prevent it from being merged safely. The Gate failed due to a missing iOS baseline snapshot. Beyond the snapshot issue, the fix contains a runtime crash for the common case of FlowDirection.MatchParent (the default), and the device test doesn't actually exercise the fix code path. A simpler, safer alternative fix was found via multi-model exploration.

Root Cause

In FormattedStringExtensions.ToNSAttributedString(Span, ...), paragraph style alignment was hardcoded to LTR-only mappings (Start→UITextAlignment.Left, End→UITextAlignment.Right), ignoring the label's FlowDirection. Introduced as a regression in 9.0.50 SR5.

Fix Quality

The PR's fix approach has three critical problems:

1. FlowDirection.MatchParent causes NotSupportedException crash (Critical)
ToUIUserInterfaceLayoutDirection() throws for FlowDirection.MatchParent in its default case. MatchParent is the default value of VisualElement.FlowDirectionProperty. Any label that does not explicitly set FlowDirection.LeftToRight or .RightToLeft will crash at runtime when FormattedText is rendered. The test pages work around this by explicitly setting FlowDirection, masking the bug.

2. Device test does not exercise the fix (Significant)
LabelStub.FormattedText is a plain auto-property without the parent-tracking logic of Controls.Label. The fix's condition span.Parent is FormattedString && formattedString.Parent is Label will never be true for LabelStub, so the device test always runs the unfixed else branch. The RTL test cases pass coincidentally (or not at all) — they do not validate the fix.

3. Missing iOS snapshot (Blocker — causes Gate failure)
The test calls VerifyScreenshot for 3 states (Issue81_InitialLTR, Issue81_ToggledRTL, Issue81_ToggledBackLTR) but only 2 iOS baselines exist. The third snapshot (Issue81_ToggledBackLTR.png) is absent, making the Gate fail every time on iOS.

Additional concerns:

Suggested Fix (Attempt 5 — ✅ Tested and Passing)

Replace the PR's approach with a minimal 1-file change at the ToNSAttributedString(this Label label) entry-point, using IFlowDirectionController.EffectiveFlowDirection — MAUI's already-resolved direction that handles MatchParent correctly:

 public static NSAttributedString? ToNSAttributedString(this Label label)
-    => ToNSAttributedString(
+    {
+        var alignment = label.HorizontalTextAlignment;
+        if (label is IFlowDirectionController flowController &&
+            flowController.EffectiveFlowDirection.IsRightToLeft())
+        {
+            alignment = alignment switch
+            {
+                TextAlignment.Start => TextAlignment.End,
+                TextAlignment.End => TextAlignment.Start,
+                _ => alignment
+            };
+        }
+
+        return ToNSAttributedString(
             label.FormattedText,
             label.RequireFontManager(),
             label.LineHeight,
-            label.HorizontalTextAlignment,
+            alignment,
             label.ToFont(),
             label.TextColor,
             label.TextTransform);
+    }

Why this is better:

  • ✅ No crash on FlowDirection.MatchParentIFlowDirectionController.EffectiveFlowDirection is already resolved
  • ✅ No new extension methods needed — FlowDirectionExtensions.cs not touched
  • ✅ No parent chain walking — operates at the Label entry-point where context is available
  • ✅ 1 file changed vs 2 files in PR
  • ✅ Consistent with MAUI's architecture for flow direction resolution
  • ✅ All 4 device test cases pass: (Start/LTR→Left), (End/LTR→Right), (Start/RTL→Right), (End/RTL→Left)

Additional required fixes for the PR:

  1. Add missing Issue81_ToggledBackLTR.png iOS snapshot (or rename and regenerate all snapshots with Issue31480_* naming)
  2. Fix LabelStub to properly set parent references so device tests actually validate the fix path (or rewrite the device test to use Controls.Label directly)
  3. Remove ToUIUserInterfaceLayoutDirection() from FlowDirectionExtensions.cs (not needed with the better approach)

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-reviewed PR was reviewed by AI agent workflow (full 4-phase review) t/bug Something isn't working

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

RightToLeft does not apply for FormattedText

6 participants