Skip to content

[iOS] Migrate deprecated Browser, FilePicker, and font APIs - #38025

Merged
kubaflo merged 8 commits into
inflight/currentfrom
jfversluis-migrate-ios-deprecated-apis
Sep 1, 2026
Merged

kubaflo merged 8 commits into
inflight/currentfrom
jfversluis-migrate-ios-deprecated-apis

Conversation

@jfversluis

@jfversluis jfversluis commented Aug 31, 2026 •

Copy link
Copy Markdown
Member

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!

Description of Change

Migrates three deprecated Apple platform API usages while preserving behavior across MAUI's supported iOS 13+ and Mac Catalyst 15+ versions:

  • Creates SFSafariViewController with SFSafariViewControllerConfiguration, explicitly retaining EntersReaderIfAvailable = false.
  • Uses the UniformTypeIdentifiers.UTType document-picker API on iOS and Mac Catalyst 14+, while retaining the legacy string-based constructor for iOS 13 and when no custom identifier resolves. asCopy: false preserves the existing open-in-place behavior.
  • Registers embedded fonts from file URLs with process scope instead of the obsolete graphics-font registration API. Stream-backed resources are copied into a SHA-256 content-addressed cache under the temporary directory and retained for the process lifetime because Core Text uses the URL as the font's backing store; cache entries are reused and newly created entries are removed if registration fails.
  • Adds an Apple device test covering registration, resolution, and glyph measurement of an embedded font resource.

There are no public API changes. The replacement APIs predate MAUI's current platform minimums except for the modern document picker, which is guarded by the compatibility path.

Validation

  • Essentials built for net10.0-ios26.0 and net10.0-maccatalyst26.0 with no warnings or errors.
  • Core built for both Apple TFMs with no warnings or errors.
  • Core device tests compiled for iOS simulator and Mac Catalyst with no warnings or errors.
  • Apple runtime execution remains for CI/macOS validation, particularly custom file-type filtering and stream-backed font registration.

Issues Fixed

N/A — resolves TODO-linked deprecated API usage.

PureWeen and others added 6 commits August 27, 2026 23:46
<!-- Please let the below note in for people that find this PR -->
> [!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](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

## Description

Updates the pinned `@microsoft/vally-cli` version used by skill
validation and live soak workflows from 0.12.0 to the latest stable
release, 0.14.0.

Also updates direct lint command examples and makes eval-spec comments
version-neutral where the described scoring behavior remains unchanged.

## Validation

- Installed Vally 0.14.0 through `.github/scripts/SetupVallyRuntime.sh`
- Strict-linted all 16 Vally evaluation specifications with Vally 0.14.0

Co-authored-by: PureWeen <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 9e73594e-38bc-4937-80c8-cc054aa890d2
<!-- Please let the below note in for people that find this PR -->
> [!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](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

## Description

Removes the `IlcTreatWarningsAsErrors=false` workaround and its TODO
from the Apple NativeAOT simulator integration test.

The linked tracking issue, #19397, was closed after all template
trimming warnings were resolved. The dedicated
`AOTTemplateTest.PublishNativeAOT` suite also maintains an empty
expected-warning baseline for Apple NativeAOT builds, so the simulator
run should enforce the default ILC warning policy again.

## Validation

- The exact `AppleTemplateTests.RunOniOS_MauiNativeAOT` test compiled
and started on Windows, but Windows could not complete the Apple ILC
phase because the iOS-simulator NativeAOT runtime pack was unavailable
(`MSB3030` for `System.Runtime.InteropServices.RuntimeInformation.dll`).
- The Windows `AOTTemplateTest.PublishNativeAOT(... win-arm64)` proxy
passed, including its assertion that the complete NativeAOT binlog
warning list is empty.

Apple-specific ILC/codegen and simulator execution require the macOS CI
lanes and will be monitored on this draft PR.

Copilot-Session: 37f90cb9-27a1-41b7-b954-95bbbcc9e81e

Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
…tforms (#37972)

<!-- Please let the below note in for people that find this PR -->
> [!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](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

## Description

Align BlazorWebView `TizenMauiAssetFileProvider` with other platforms.
…pt 1/10)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…tion: wait before tap (refs #37653) (#37999)

> [!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](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

Workflow artifact: ci-fix
Artifact kind: deflake
Refs: #37653
Target branch: main
Attempt: 1/10


## Attempt 1 of 10

Wait for the Shell navigation button to be ready before the test taps
it.

### Previous attempts (prior commits on this PR)

No prior attempts.

This attempt differs by adding deterministic synchronization at the
first interaction rather than changing product behavior, increasing a
timeout, or retrying the test.

## Root cause

The CI log reports
`ShellContentShouldRespectSafeAreaEdges_After_Navigation` timing out
while waiting for the expected element. In `Issue32941.cs`, the test
waited for `MainPageLabel` and then immediately tapped
`GoToSignOutButton`; the button could still be unavailable while the
Shell page finished mounting.

Flake class: test-quality

## Why this was flaky

The test synchronized on a label that proves the initial page is
visible, but not on the separate button it interacts with. In build
1573324 the test failed after 18 seconds and then passed in 3 seconds on
retry, which is consistent with that readiness race rather than a
deterministic safe-area failure.

## De-flake

The test now calls `WaitForElement("GoToSignOutButton")` immediately
before `Tap`. No assertion was weakened, no timeout was increased, and
no retry attribute was added.

## Fix

Add the repository-standard readiness wait for the exact element being
tapped. This is the smallest correction to the test interaction and
leaves the navigation and safe-area assertions unchanged.

## What is unverified / where I need help

- The Android UI test could not be run because this runner has no
Android UI-test device rig.
- Please confirm on the gated Android UI-test leg that the button wait
removes the intermittent navigation timeout while the existing safe-area
assertions remain green.

## Validation

- Command: `not run because no Android UI-test device rig is available
in this runner`
- Result: not run

## Evidence

- Original failing build (from tracking issue):
https://dev.azure.com/dnceng-public/public/_build/results?buildId=1558675
- Latest verified-failing build:
https://dev.azure.com/dnceng-public/public/_build/results?buildId=1573324

---
Filed by
[`ci-status-fix`](https://github.com/dotnet/maui/blob/main/.github/workflows/ci-status-fix.md).
This is the single PR for #37653: the workflow watches its
own CI and pushes up to **10 attempts on this same PR** (it never opens
a second PR). It advances only when the fix's own build settles red and
that red is caused by the fix. Comments, reviews, and commits do not
transfer ownership; the loop remains autonomous until this PR is closed.
Eligible `CHANGES_REQUESTED` reviews are handled through Track C. After
10 attempts it stops and defers to humans. In round 1 a maintainer still
needs to comment `/azp run maui-pr` (plus the gated uitests/devicetests
legs when relevant) to exercise each new commit.

> Generated by [CI Failure Fixer
(main)](https://github.com/dotnet/maui/actions/runs/33284777954) · gpt56
· 615.6 AIC · ⌖ 86.4 AIC · ⊞ 31.1K ·
[◷](https://github.com/search?q=repo%3Adotnet%2Fmaui+%22gh-aw-workflow-id%3A+ci-status-fix%22&type=pullrequests)

<!-- gh-aw-agentic-workflow: CI Failure Fixer (main), engine: copilot,
model: gpt-5.6-sol, id: 33284777954, workflow_id: ci-status-fix, run:
https://github.com/dotnet/maui/actions/runs/33284777954 -->

<!-- gh-aw-workflow-id: ci-status-fix -->
<!-- gh-aw-workflow-call-id: dotnet/maui/ci-status-fix -->

Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
Replace deprecated Safari, document picker, and CoreText font registration APIs while preserving the iOS 13 file picker fallback.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 0072c78c-632d-42cd-9d17-5c6007ce7875
Copilot AI lite review requested due to automatic review settings August 31, 2026 08:38
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 38025

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 38025"

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
There may be pipelines that require an authorized user to comment /azp run to run.

@jfversluis

Copy link
Copy Markdown
Member Author

/azp run maui-pr-devicetests

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@github-actions github-actions Bot added area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info platform/ios platform/macos macOS / Mac Catalyst labels Aug 31, 2026
Copilot stopped reviewing on behalf of jfversluis due to an error August 31, 2026 08:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

Review tier: Lite
Findings: 3 Medium severity · 1 Low severity

New issues introduced by this change (4)
Severity Finding
Medium severity src/​Core/​src/​Fonts/​EmbeddedFontLoader.iOS.cs — When copying font.ResourceStream into the temporary file, the stream may not be positioned at 0.…
Medium severity src/​Core/​src/​Fonts/​EmbeddedFontLoader.iOS.cs — This exception message is misleading in the !File.Exists(fontPath) case: the failure is that the…
Medium severity src/​Essentials/​src/​FilePicker/​FilePicker.ios.cs — The dot-based heuristic for deciding whether allowedUti is a filename extension is hard to reason…
Low severity src/​Core/​src/​Fonts/​EmbeddedFontLoader.iOS.cs — These two catch blocks are identical. You can reduce duplication by using a single filtered catch…
What changed in this PR

[!NOTE]
Copilot was unable to run its full agentic suite in this review.

Updates iOS/MacCatalyst implementations to use modern OS APIs (UTType / SafariViewController configuration), and improves embedded font loading by registering fonts via URL (with a temp-file path when needed).

Changes:

  • Replaced MobileCoreServices UTType usage with UniformTypeIdentifiers and centralized UTI strings for file picking.
  • Updated iOS Browser launch to use SFSafariViewControllerConfiguration instead of an obsolete constructor pattern.
  • Reworked iOS embedded font loading to register fonts from a file URL and added a device test for embedded fonts.
File Description
src/​Essentials/​src/​FilePicker/​FilePicker.ios.cs Migrates file picker to UTType-based workflow (iOS 14+) with fallback for older OS versions; centralizes UTI constants.
src/​Essentials/​src/​Browser/​Browser.ios.cs Uses SFSafariViewControllerConfiguration to avoid deprecated/unsupported constructor usage.
src/​Core/​tests/​DeviceTests/​Services/​FontManagerTests.iOS.cs Adds coverage for loading an embedded font on iOS.
src/​Core/​src/​Fonts/​EmbeddedFontLoader.iOS.cs Loads embedded fonts via a temporary file path and registers via CTFontManager.RegisterFontsForUrl.

Improve missing-font diagnostics and simplify UTType extension fallback while preserving existing stream and cleanup semantics.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 0072c78c-632d-42cd-9d17-5c6007ce7875
Copilot AI review requested due to automatic review settings August 31, 2026 09:13
@jfversluis

Copy link
Copy Markdown
Member Author

/azp run maui-pr-devicetests

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

Review tier: Lite
Findings: None

Issues resolved since last review (4)
Severity Finding
Low severity src/​Core/​src/​Fonts/​EmbeddedFontLoader.iOS.cs — These two catch blocks are identical. You can reduce duplication by using a single filtered catch… View resolved comment
Medium severity src/​Essentials/​src/​FilePicker/​FilePicker.ios.cs — The dot-based heuristic for deciding whether allowedUti is a filename extension is hard to reason… View resolved comment
Medium severity src/​Core/​src/​Fonts/​EmbeddedFontLoader.iOS.cs — This exception message is misleading in the !File.Exists(fontPath) case: the failure is that the… View resolved comment
Medium severity src/​Core/​src/​Fonts/​EmbeddedFontLoader.iOS.cs — When copying font.ResourceStream into the temporary file, the stream may not be positioned at 0.… View resolved comment

@jfversluis

Copy link
Copy Markdown
Member Author

/azp run maui-pr-devicetests

@jfversluis

Copy link
Copy Markdown
Member Author

/azp run maui-pr

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@kubaflo

This comment has been minimized.

@github-actions github-actions Bot added the s/agent-review-in-progress AI review is currently running for this PR label Sep 1, 2026

@MauiBot MauiBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

AI Review Summary

@jfversluis — new AI review results are available based on commit eff4574.

Gate Inconclusive Confidence Medium Platform iOS


🗂️ Review Sessions — click to expand
🚦 Gate — Test Before & After Fix

Gate Result: ⚠️ INCONCLUSIVE

Platform: IOS · Base: main · Merge base: 3712767b

🩺 Could not verify — environment/infrastructure error. The gate ran the tests but hit an environment error (an emulator/simulator/Appium/XHarness flake, a device that would not boot, or an empty/invalid result file), so it could not record a real pass/fail. The ⚠️ ENV ERROR marks below are infrastructure, not test failures — this is not a problem with your PR. Comment /review to retry on a fresh agent.

XHarness did not produce the expected fresh result 'testResults.xml' for requested class(es) 'Microsoft.Maui.DeviceTests.FontManagerTests' (the target tests did not run).

Test Without Fix (expect FAIL) With Fix (expect PASS)
📱 FontManagerTests Category=Fonts ⚠️ ENV ERROR ⚠️ ENV ERROR
🔴 Without fix — 📱 FontManagerTests: ⚠️ ENV ERROR · 190s

No log file found

🟢 With fix — 📱 FontManagerTests: ⚠️ ENV ERROR · 78s

No log file found

⚠️ Failure Details

  • ⚠️ FontManagerTests without fix: XHarness did not produce the expected fresh result 'testResults.xml' for requested class(es) 'Microsoft.Maui.DeviceTests.FontManagerTests' (the target tests did not run).
  • ⚠️ FontManagerTests with fix: XHarness did not produce the expected fresh result 'testResults.xml' for requested class(es) 'Microsoft.Maui.DeviceTests.FontManagerTests' (the target tests did not run).
📁 Fix files reverted (3 files)
  • src/Core/src/Fonts/EmbeddedFontLoader.iOS.cs
  • src/Essentials/src/Browser/Browser.ios.cs
  • src/Essentials/src/FilePicker/FilePicker.ios.cs

📋 Pre-Flight — Context & Validation

PR #38025 Pre-Flight

Context

  • Title: [iOS] Migrate deprecated Browser, FilePicker, and font APIs
  • State: Open, targeting main
  • Author: jfversluis
  • Remote head: eff4574074d58349b40e83e57fee620babd39620
  • Local review commit: ecfc172065d530e0b6d1a59b6e9e67058ecc598c (PR #38025 squashed for review)
  • Issue: No linked issue; the PR resolves TODO-marked deprecated Apple API usage.
  • Platform: iOS (the .iOS.cs implementation also compiles for Mac Catalyst).
  • Gate: INCONCLUSIVE because the existing gate could not build or run the tests. This is not evidence that the PR fix fails, and the gate must not be rerun in STEP 5a.

GitHub CLI authentication was unavailable. Public GitHub API metadata and review comments were used together with the locally materialized squashed PR commit. The unrelated pre-existing working-tree changes are outside the four committed PR files and must remain untouched.

Committed PR Delta

The directly inspected HEAD^..HEAD delta contains 181 additions and 49 deletions in four files:

  1. src/Core/src/Fonts/EmbeddedFontLoader.iOS.cs
    • Replaces obsolete in-memory RegisterGraphicsFont registration with process-scoped URL registration.
    • Materializes stream-backed fonts in a SHA-256 content-addressed cache under the temporary directory.
    • Retains successful cache files for the process lifetime because Core Text may lazily read URL-backed glyph data.
    • Reuses existing cache entries and removes newly created entries after failed registration.
  2. src/Core/tests/DeviceTests/Services/FontManagerTests.iOS.cs
    • Adds CanLoadEmbeddedFont.
    • Verifies family resolution and forces glyph access by measuring text.
  3. src/Essentials/src/Browser/Browser.ios.cs
    • Replaces the obsolete Safari controller constructor with SFSafariViewControllerConfiguration.
    • Explicitly preserves EntersReaderIfAvailable = false and disposes the configuration after controller construction.
  4. src/Essentials/src/FilePicker/FilePicker.ios.cs
    • Uses UniformTypeIdentifiers.UTType on iOS/Mac Catalyst 14+.
    • Resolves identifiers first, filename extensions second, and reverse-DNS custom identifiers third.
    • Skips unresolved values and falls back to the legacy string constructor if none resolve.
    • Preserves open-in-place behavior with asCopy: false and retains the iOS 13 compatibility path.

There are no public API changes.

Review History Relevant to Alternative Design

Earlier revisions received findings for stream-position semantics, misleading missing-file diagnostics, extension resolution, invalid imported identifiers, URL-backed font lifetime, extensionless font names, insufficient glyph-level validation, and Safari configuration disposal. The current revision addresses those findings except that stream-backed input intentionally continues from its current position, matching the prior NSData.FromStream behavior and other platform loaders.

The current font solution is already the process-lifetime content-addressed file-cache approach suggested by the earlier review. A new candidate must not repeat that mechanism. Earlier discussion also mentions an in-memory descriptor-registration candidate, so an attempt using that idea must establish a materially different and supported implementation rather than merely restating it.

Bounded Validation

  • Primary test command: pwsh .github/skills/run-device-tests/scripts/Run-DeviceTests.ps1 -Project Core -Platform ios -TestFilter "Category=Fonts"
  • Mandatory regression tests: None were included in the generated STEP 5a prompt.
  • Run only the primary command. Do not rerun gate verification and do not run a full suite.
  • Each candidate receives one implementation/test pass and at most one focused correction/retest.

Candidate Constraints

  • Work from the baseline established only by .github/scripts/EstablishBrokenBaseline.ps1.
  • Modify only paths listed in .github/.baseline-state.json under RevertedFiles.
  • Preserve all unrelated and untracked worktree content.
  • Explore one coherent alternative to the PR's migration, not a patch layered onto the PR implementation.
  • Perform only the try-fix skill's inline expert self-review; do not launch another reviewer.
  • Persist and restore the attempt even when testing is blocked by the same environment limitation as the gate.

🔬 Code Review — Deep Analysis

Expert Evaluation — Raw PR Fix

Verdict: LGTM
Confidence: medium

Independent Assessment

What this changes: The submitted patch replaces three obsolete Apple APIs while preserving their prior behavior: Safari is created with an explicit configuration, the document picker uses UTType on iOS/Mac Catalyst 14+ with an iOS 13 compatibility path, and embedded fonts are registered from stable process-scoped URLs. Stream-backed fonts are materialized into a SHA-256 content-addressed cache and retained after successful registration. The Apple device test now resolves the embedded font and forces glyph access through text measurement.

Inferred motivation: Remove Apple deprecation warnings without changing MAUI's public API, supported-platform behavior, open-in-place file selection, or embedded-font rendering.

Approach assessment: The implementation is coherent and appropriately localized. The URL-backed font registration now has a durable backing file, concurrent cache creation is serialized, failed newly-created entries are cleaned up, and already-registered fonts are accepted only after confirming UIFont can resolve the PostScript name. The FilePicker path resolves identifiers and extensions, limits imported-type creation to reverse-DNS-shaped values, ignores individual unresolved values, and falls back to the legacy constructor if none resolve.

Reconciliation with PR Narrative

The current title and description agree with the submitted diff. The described Safari configuration, version-gated modern picker, asCopy: false behavior, process-lifetime content-addressed font cache, failure cleanup, cache reuse, and glyph-measurement device test are all present in the raw PR HEAD.

Prior Review Reconciliation

Prior error-level concern Status in submitted HEAD Evidence
URL-backed stream font file was deleted immediately after registration Fixed Successful cache entries are retained; only a newly-created entry is deleted after registration failure.
Bare built-in video extensions could be passed to imported-type creation Fixed Extension lookup is attempted first; imported types are created only for unresolved values containing a non-leading dot, while unresolved bare extensions are skipped.
Font test checked descriptor metadata but not glyph access Fixed CanLoadEmbeddedFont measures "Maui" and asserts non-zero dimensions.
Extensionless font names produced a trailing-dot path Fixed The extension is appended only when Path.GetExtension is non-empty.
Safari configuration was not disposed Fixed SFSafariViewControllerConfiguration is declared with using var.

No unresolved prior error-level finding applies to the current committed diff. The single authorized maui-expert-reviewer pass produced inline-findings.json containing [].

Blast Radius Assessment

  • Runs for all instances: No. Browser and FilePicker changes run only when those APIs are invoked; stream staging runs only for an EmbeddedFont with a resource stream.
  • Startup impact: Font registration can occur during application font initialization, but the new cache work is scoped to fonts that require stream materialization.
  • Static/shared state: A process-wide lock coordinates cache creation. Successful cache files intentionally persist for the process lifetime because Core Text may lazily access the URL.
  • Public API: None.

Gate and Validation Status

The trusted gate is INCONCLUSIVE because XHarness produced no fresh testResults.xml; both before-fix and with-fix target tests did not run. This is an infrastructure result, not a regression-test failure. Although authenticated GitHub CLI required-check discovery was unavailable to the expert sub-agent, anonymous current-HEAD evidence shows every published check run completed and all non-skipped runs succeeded, including the complete maui-pr matrix and Build Analysis.

Findings

No actionable file-and-line findings were found in the submitted HEAD.

Failure-Mode Probing

  • Repeated/concurrent stream registration: Each caller writes an isolated temporary file, hashes the bytes, and converges on one cache path under FontCacheLock; duplicate registration is accepted only when the font resolves through UIFont.
  • Stream position: Copying begins at the stream's current position, preserving the previous NSData.FromStream behavior.
  • Failed registration: A newly-created cache entry is removed; a reused process-lifetime entry is retained because another successful registration may depend on it.
  • Unsupported FilePicker value: Unresolved values are omitted from the modern list; if every value is unresolved, construction falls back to the legacy string API rather than passing an empty UTType array.
  • iOS 13: The legacy open-mode constructor remains behind the platform check.
  • Browser configuration lifetime: The controller is constructed before the configuration wrapper is disposed; no later managed access to the configuration occurs.

External Output Contract

Not applicable.

Conclusion

The code review found the raw PR fix mechanically sound and found no reviewer patch to apply. Confidence is capped at medium because this is Apple-platform code and the focused runtime gate did not produce a result.


🛠️ Try-Fix — Analysis & Comparison

Try-Fix Aggregate (PR #38025)

Candidate Mechanism Result Source diff Primary test
1 Deterministic logical-identity staging to stable process-lifetime named URLs Blocked — baseline precondition None Not run (0 executions)
2 Anonymous process-lifetime file-descriptor lease exposed through /dev/fd Blocked — baseline precondition None Not run (0 executions)

Candidate 1

Candidate 1 avoided the PR's SHA-256 content-addressed named-file cache by planning logical font identity → stable named URL staging. It also avoided immediate deletion and in-memory descriptor registration. EstablishBrokenBaseline.ps1 rejected the pre-existing dirty tracked worktree; .github/.baseline-state.json was absent, so no edits or tests were permitted. Inline self-review was clean for an empty diff. Restore returned No baseline state found / Restored=False.

  • Artifacts: CustomAgentLogsTmp/PRState/38025/PRAgent/try-fix/attempt-1/
  • Wrapper: CustomAgentLogsTmp/PRState/38025/PRAgent/try-fix-1/content.md

Candidate 2

Candidate 2 deliberately did not repeat or reopen candidate 1. It planned to make a retained kernel file descriptor—not a content-hashed or logical-identity named cache path—the owner of stream font bytes, registering through /dev/fd so lazy Core Text reads could use the live descriptor. It avoided the prior immediate-deletion and in-memory descriptor ideas. The same dirty-worktree baseline precondition blocked creation of .github/.baseline-state.json; no edits or primary test execution were allowed. Inline self-review was clean for an empty diff. Mandatory restore returned No baseline state found / Restored=False.

  • Artifacts: CustomAgentLogsTmp/PRState/38025/PRAgent/try-fix/attempt-2/
  • Wrapper: CustomAgentLogsTmp/PRState/38025/PRAgent/try-fix-2/content.md

Comparison and completion

Both candidates are Blocked due to the baseline safety precondition, not Fail and not Pass. Neither produced a candidate code diff or behavioral evidence, so no code winner can be selected. Candidate 2 is mechanism-level distinct from candidate 1 and the PR, but remains hypothetical and unvalidated.

Candidate generation is complete: exactly two candidates are recorded. No further attempt, reviewer agent, or cross-pollination was run.


🏁 Report — Final Recommendation

✅ Final Recommendation: APPROVE

Winner: pr

The submitted PR is the only complete, implemented candidate with current-HEAD CI evidence, and the single expert review found no actionable defect. The trusted targeted gate was inconclusive because XHarness produced no result file, not because a test failed; this evidence gap lowers confidence but does not make an unimplemented alternative stronger.

Comparative Ranking

Rank Candidate Implementation Validation Assessment
1 pr Complete four-file Apple API migration and glyph-level device test Current maui-pr and Build Analysis checks passed; targeted iOS Fonts gate was infrastructure-inconclusive Winner. Sound implementation, no current expert findings, and all earlier review concerns are resolved.
2 pr-plus-reviewer Identical to pr; the expert produced no reviewer patch Diff check passed; no duplicate targeted run was warranted for a zero-delta candidate No incremental correctness, coverage, or validation advantage over the submitted PR.
3 try-fix-1 Design only: stable process-lifetime named staging keyed by logical font identity Blocked before edits; 0 test executions; no source diff Hypothetical and unvalidated. It cannot outrank complete working source.
4 try-fix-2 Design only: retained file-descriptor lease exposed through /dev/fd Blocked before edits; 0 test executions; no source diff More platform-sensitive and unvalidated; no evidence establishes Core Text support or lifecycle safety.

No candidate failed a regression test. Both STEP 5a candidates were blocked by their baseline precondition, and the raw PR gate was inconclusive due to infrastructure; none of those outcomes is a test failure.

Expert Review of the Submitted Fix

The single authorized maui-expert-reviewer pass emitted no inline findings (inline-findings.json is []). Independent review confirmed:

  • SFSafariViewControllerConfiguration explicitly preserves reader mode as disabled and is disposed after controller construction.
  • FilePicker uses the typed UTType constructor only on supported OS versions, preserves asCopy: false, resolves identifiers and filename extensions, restricts imported declarations to reverse-DNS-shaped identifiers, skips individual unresolved values, and falls back to the legacy iOS 13 path when none resolve.
  • Stream-backed fonts are copied from the stream's current position into a content-addressed cache, cache creation is synchronized, successful URL backing files survive for Core Text's process-scoped lifetime, and newly-created failed entries are removed.
  • The new device test resolves the embedded face and measures text, covering glyph access rather than descriptor metadata alone.

Earlier error-level comments applied to older revisions. The current submitted HEAD fixes immediate backing-file deletion, unsafe imported-type handling, metadata-only font coverage, extensionless cache naming, and Safari configuration disposal.

Candidate Comparison

pr-plus-reviewer deliberately contains no source delta: expert feedback supplied nothing actionable to consolidate. Treating the identical copy as a separate winner would falsely imply that the submitted branch needs changes.

try-fix-1 proposes logical-identity file staging, but it never produced code and would give weaker deduplication semantics than the PR's content identity when the same logical name maps to changed bytes. try-fix-2 avoids a named cache through /dev/fd, but it likewise has no implementation or test evidence and introduces a retained-descriptor lifecycle plus dependence on Core Text reopening that path. Neither blocked design provides evidence sufficient to displace the PR.

Evidence and Residual Uncertainty

  • Trusted gate: INCONCLUSIVE because no fresh testResults.xml was produced for either side; this is explicitly an environment/harness outcome.
  • Current PR HEAD: all published check runs completed; all non-skipped checks succeeded, including maui-pr, its macOS/Windows build and integration jobs, and Build Analysis.
  • Regression cross-reference: CLEAN.
  • Focused Apple runtime execution remains unverified in this run, so confidence is medium, not high.

The raw submitted PR therefore wins on correctness, completeness, simplicity, and available evidence.


📱 UI Tests — Button,Label,Layout

Detected UI test categories: Button,Label,Layout

❌ Deep UI tests — 353 passed, 2 failed, 8 skipped across 3 categories on platform-pool agent (replaces in-process counts above).

🧪 UI Test Execution Results (deep, platform pool)

Category Tests Snapshot diffs
Button 71/72 (1 skipped) ✓ —
Label 90/92 (2 skipped) ✓ —
Layout 192/199 (2 ❌, 5 skipped) —
🔍 AI analysis of failures — PR-related vs unrelated

🔍 AI-generated triage (GitHub Copilot CLI) — a heuristic judgement of whether each deep UI test failure is connected to this PR's changes. Verify before relying on it.

Likely unrelated: the failures appear pre-existing, flaky, or infrastructure.

  • ● Unrelated — iOS keyboard-scrolling layout/automation (~2 tests): both failures stay in Entry/Editor keyboard avoidance (one geometry assertion and one Appium element lookup), which the PR does not change, and the fixed-height test controls do not select any embedded font affected by the font-loader rewrite.
❌ Layout — 2 failed tests
EntriesScrollingPageTest
Assert.That(arg1, Is.LessThan(arg2))
  Expected: less than 829
  But was:  869
at NUnit.Framework.Legacy.ClassicAssert.Less(Int32 arg1, Int32 arg2)
   at Microsoft.Maui.TestCases.Tests.KeyboardScrolling.CheckIfViewAboveKeyboard(IApp app, String marked, Boolean isEditor) in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/KeyboardScrolling.cs:line 98
   at Microsoft.Maui.TestCases.Tests.KeyboardScrolling.ClickText(IApp app, String marked, Boolean isEditor, Boolean& didReachEndofPage) in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/KeyboardScrolling.cs:line 67
   at Microsoft.Maui.TestCases.Tests.KeyboardScrolling.RunScrollingTest(IApp app, String galleryName, Boolean isEditor) in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/KeyboardScrolling.cs:line 47
   at Microsoft.Maui.TestCases.Tests.KeyboardScrolling.EntriesScrollingTest(IApp app, String galleryName) in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/KeyboardScrolling.cs:line 17
   at Microsoft.Maui.TestCases.Test
...
EditorsScrollingPageTest
OpenQA.Selenium.NoSuchElementException : An element could not be located on the page using the given search parameters.; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception
at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse, String commandToExecute)
   at OpenQA.Selenium.WebDriver.ExecuteAsync(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.Appium.AppiumDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.WebDriver.FindElement(String mechanism, String value)
   at OpenQA.Selenium.Appium.AppiumDriver.FindElement(String by, String value)
   at OpenQA.Selenium.Appium.MobileBy.FindElement(ISearchContext context)
   at OpenQA.Selenium.WebDriver.FindElement(By by)
   at OpenQA.Selenium.Appium.AppiumDriver.FindElement(By by)
   at Microsoft.Maui.TestCases.Tests.KeyboardScrolling.CloseiOSEditorKeyboard(AppiumDr
...

📎 Download drop-deep-uitests artifact (TRX + snapshot diffs)


🧭 Next Steps — review latest findings

No alternative fix was selected for this run. Review the session findings and CI results before merging.

@MauiBot MauiBot added s/agent-approved AI agent recommends approval - PR fix is correct and optimal and removed s/agent-changes-requested AI agent recommends changes - found a better alternative or issues s/agent-review-in-progress AI review is currently running for this PR labels Sep 1, 2026
@kubaflo

kubaflo commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

@kubaflo
kubaflo changed the base branch from main to inflight/current September 1, 2026 22:42
@kubaflo
kubaflo merged commit e2ef14c into inflight/current Sep 1, 2026
139 of 154 checks passed
@kubaflo
kubaflo deleted the jfversluis-migrate-ios-deprecated-apis branch September 1, 2026 22:42
kubaflo added a commit that referenced this pull request Sep 2, 2026
<!-- Please let the below note in for people that find this PR -->
> [!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](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

Migrates three deprecated Apple platform API usages while preserving
behavior across MAUI's supported iOS 13+ and Mac Catalyst 15+ versions:

- Creates `SFSafariViewController` with
`SFSafariViewControllerConfiguration`, explicitly retaining
`EntersReaderIfAvailable = false`.
- Uses the `UniformTypeIdentifiers.UTType` document-picker API on iOS
and Mac Catalyst 14+, while retaining the legacy string-based
constructor for iOS 13 and when no custom identifier resolves. `asCopy:
false` preserves the existing open-in-place behavior.
- Registers embedded fonts from file URLs with process scope instead of
the obsolete graphics-font registration API. Stream-backed resources are
copied into a SHA-256 content-addressed cache under the temporary
directory and retained for the process lifetime because Core Text uses
the URL as the font's backing store; cache entries are reused and newly
created entries are removed if registration fails.
- Adds an Apple device test covering registration, resolution, and glyph
measurement of an embedded font resource.

There are no public API changes. The replacement APIs predate MAUI's
current platform minimums except for the modern document picker, which
is guarded by the compatibility path.

### Validation

- Essentials built for `net10.0-ios26.0` and `net10.0-maccatalyst26.0`
with no warnings or errors.
- Core built for both Apple TFMs with no warnings or errors.
- Core device tests compiled for iOS simulator and Mac Catalyst with no
warnings or errors.
- Apple runtime execution remains for CI/macOS validation, particularly
custom file-type filtering and stream-backed font registration.

### Issues Fixed

N/A — resolves TODO-linked deprecated API usage.

---------

Co-authored-by: Shane Neuville <5375137+PureWeen@users.noreply.github.com>
Co-authored-by: PureWeen <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Sep 3, 2026
<!-- Please let the below note in for people that find this PR -->
> [!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](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

Migrates three deprecated Apple platform API usages while preserving
behavior across MAUI's supported iOS 13+ and Mac Catalyst 15+ versions:

- Creates `SFSafariViewController` with
`SFSafariViewControllerConfiguration`, explicitly retaining
`EntersReaderIfAvailable = false`.
- Uses the `UniformTypeIdentifiers.UTType` document-picker API on iOS
and Mac Catalyst 14+, while retaining the legacy string-based
constructor for iOS 13 and when no custom identifier resolves. `asCopy:
false` preserves the existing open-in-place behavior.
- Registers embedded fonts from file URLs with process scope instead of
the obsolete graphics-font registration API. Stream-backed resources are
copied into a SHA-256 content-addressed cache under the temporary
directory and retained for the process lifetime because Core Text uses
the URL as the font's backing store; cache entries are reused and newly
created entries are removed if registration fails.
- Adds an Apple device test covering registration, resolution, and glyph
measurement of an embedded font resource.

There are no public API changes. The replacement APIs predate MAUI's
current platform minimums except for the modern document picker, which
is guarded by the compatibility path.

### Validation

- Essentials built for `net10.0-ios26.0` and `net10.0-maccatalyst26.0`
with no warnings or errors.
- Core built for both Apple TFMs with no warnings or errors.
- Core device tests compiled for iOS simulator and Mac Catalyst with no
warnings or errors.
- Apple runtime execution remains for CI/macOS validation, particularly
custom file-type filtering and stream-backed font registration.

### Issues Fixed

N/A — resolves TODO-linked deprecated API usage.

---------

Co-authored-by: Shane Neuville <5375137+PureWeen@users.noreply.github.com>
Co-authored-by: PureWeen <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Sep 6, 2026
<!-- Please let the below note in for people that find this PR -->
> [!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](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

Migrates three deprecated Apple platform API usages while preserving
behavior across MAUI's supported iOS 13+ and Mac Catalyst 15+ versions:

- Creates `SFSafariViewController` with
`SFSafariViewControllerConfiguration`, explicitly retaining
`EntersReaderIfAvailable = false`.
- Uses the `UniformTypeIdentifiers.UTType` document-picker API on iOS
and Mac Catalyst 14+, while retaining the legacy string-based
constructor for iOS 13 and when no custom identifier resolves. `asCopy:
false` preserves the existing open-in-place behavior.
- Registers embedded fonts from file URLs with process scope instead of
the obsolete graphics-font registration API. Stream-backed resources are
copied into a SHA-256 content-addressed cache under the temporary
directory and retained for the process lifetime because Core Text uses
the URL as the font's backing store; cache entries are reused and newly
created entries are removed if registration fails.
- Adds an Apple device test covering registration, resolution, and glyph
measurement of an embedded font resource.

There are no public API changes. The replacement APIs predate MAUI's
current platform minimums except for the modern document picker, which
is guarded by the compatibility path.

### Validation

- Essentials built for `net10.0-ios26.0` and `net10.0-maccatalyst26.0`
with no warnings or errors.
- Core built for both Apple TFMs with no warnings or errors.
- Core device tests compiled for iOS simulator and Mac Catalyst with no
warnings or errors.
- Apple runtime execution remains for CI/macOS validation, particularly
custom file-type filtering and stream-backed font registration.

### Issues Fixed

N/A — resolves TODO-linked deprecated API usage.

---------

Co-authored-by: Shane Neuville <5375137+PureWeen@users.noreply.github.com>
Co-authored-by: PureWeen <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Sep 7, 2026
<!-- Please let the below note in for people that find this PR -->
> [!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](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

Migrates three deprecated Apple platform API usages while preserving
behavior across MAUI's supported iOS 13+ and Mac Catalyst 15+ versions:

- Creates `SFSafariViewController` with
`SFSafariViewControllerConfiguration`, explicitly retaining
`EntersReaderIfAvailable = false`.
- Uses the `UniformTypeIdentifiers.UTType` document-picker API on iOS
and Mac Catalyst 14+, while retaining the legacy string-based
constructor for iOS 13 and when no custom identifier resolves. `asCopy:
false` preserves the existing open-in-place behavior.
- Registers embedded fonts from file URLs with process scope instead of
the obsolete graphics-font registration API. Stream-backed resources are
copied into a SHA-256 content-addressed cache under the temporary
directory and retained for the process lifetime because Core Text uses
the URL as the font's backing store; cache entries are reused and newly
created entries are removed if registration fails.
- Adds an Apple device test covering registration, resolution, and glyph
measurement of an embedded font resource.

There are no public API changes. The replacement APIs predate MAUI's
current platform minimums except for the modern document picker, which
is guarded by the compatibility path.

### Validation

- Essentials built for `net10.0-ios26.0` and `net10.0-maccatalyst26.0`
with no warnings or errors.
- Core built for both Apple TFMs with no warnings or errors.
- Core device tests compiled for iOS simulator and Mac Catalyst with no
warnings or errors.
- Apple runtime execution remains for CI/macOS validation, particularly
custom file-type filtering and stream-backed font registration.

### Issues Fixed

N/A — resolves TODO-linked deprecated API usage.

---------

Co-authored-by: Shane Neuville <5375137+PureWeen@users.noreply.github.com>
Co-authored-by: PureWeen <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Sep 8, 2026
<!-- Please let the below note in for people that find this PR -->
> [!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](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

Migrates three deprecated Apple platform API usages while preserving
behavior across MAUI's supported iOS 13+ and Mac Catalyst 15+ versions:

- Creates `SFSafariViewController` with
`SFSafariViewControllerConfiguration`, explicitly retaining
`EntersReaderIfAvailable = false`.
- Uses the `UniformTypeIdentifiers.UTType` document-picker API on iOS
and Mac Catalyst 14+, while retaining the legacy string-based
constructor for iOS 13 and when no custom identifier resolves. `asCopy:
false` preserves the existing open-in-place behavior.
- Registers embedded fonts from file URLs with process scope instead of
the obsolete graphics-font registration API. Stream-backed resources are
copied into a SHA-256 content-addressed cache under the temporary
directory and retained for the process lifetime because Core Text uses
the URL as the font's backing store; cache entries are reused and newly
created entries are removed if registration fails.
- Adds an Apple device test covering registration, resolution, and glyph
measurement of an embedded font resource.

There are no public API changes. The replacement APIs predate MAUI's
current platform minimums except for the modern document picker, which
is guarded by the compatibility path.

### Validation

- Essentials built for `net10.0-ios26.0` and `net10.0-maccatalyst26.0`
with no warnings or errors.
- Core built for both Apple TFMs with no warnings or errors.
- Core device tests compiled for iOS simulator and Mac Catalyst with no
warnings or errors.
- Apple runtime execution remains for CI/macOS validation, particularly
custom file-type filtering and stream-backed font registration.

### Issues Fixed

N/A — resolves TODO-linked deprecated API usage.

---------

Co-authored-by: Shane Neuville <5375137+PureWeen@users.noreply.github.com>
Co-authored-by: PureWeen <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Sep 9, 2026
<!-- Please let the below note in for people that find this PR -->
> [!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](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

Migrates three deprecated Apple platform API usages while preserving
behavior across MAUI's supported iOS 13+ and Mac Catalyst 15+ versions:

- Creates `SFSafariViewController` with
`SFSafariViewControllerConfiguration`, explicitly retaining
`EntersReaderIfAvailable = false`.
- Uses the `UniformTypeIdentifiers.UTType` document-picker API on iOS
and Mac Catalyst 14+, while retaining the legacy string-based
constructor for iOS 13 and when no custom identifier resolves. `asCopy:
false` preserves the existing open-in-place behavior.
- Registers embedded fonts from file URLs with process scope instead of
the obsolete graphics-font registration API. Stream-backed resources are
copied into a SHA-256 content-addressed cache under the temporary
directory and retained for the process lifetime because Core Text uses
the URL as the font's backing store; cache entries are reused and newly
created entries are removed if registration fails.
- Adds an Apple device test covering registration, resolution, and glyph
measurement of an embedded font resource.

There are no public API changes. The replacement APIs predate MAUI's
current platform minimums except for the modern document picker, which
is guarded by the compatibility path.

### Validation

- Essentials built for `net10.0-ios26.0` and `net10.0-maccatalyst26.0`
with no warnings or errors.
- Core built for both Apple TFMs with no warnings or errors.
- Core device tests compiled for iOS simulator and Mac Catalyst with no
warnings or errors.
- Apple runtime execution remains for CI/macOS validation, particularly
custom file-type filtering and stream-backed font registration.

### Issues Fixed

N/A — resolves TODO-linked deprecated API usage.

---------

Co-authored-by: Shane Neuville <5375137+PureWeen@users.noreply.github.com>
Co-authored-by: PureWeen <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Sep 11, 2026
<!-- Please let the below note in for people that find this PR -->
> [!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](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

Migrates three deprecated Apple platform API usages while preserving
behavior across MAUI's supported iOS 13+ and Mac Catalyst 15+ versions:

- Creates `SFSafariViewController` with
`SFSafariViewControllerConfiguration`, explicitly retaining
`EntersReaderIfAvailable = false`.
- Uses the `UniformTypeIdentifiers.UTType` document-picker API on iOS
and Mac Catalyst 14+, while retaining the legacy string-based
constructor for iOS 13 and when no custom identifier resolves. `asCopy:
false` preserves the existing open-in-place behavior.
- Registers embedded fonts from file URLs with process scope instead of
the obsolete graphics-font registration API. Stream-backed resources are
copied into a SHA-256 content-addressed cache under the temporary
directory and retained for the process lifetime because Core Text uses
the URL as the font's backing store; cache entries are reused and newly
created entries are removed if registration fails.
- Adds an Apple device test covering registration, resolution, and glyph
measurement of an embedded font resource.

There are no public API changes. The replacement APIs predate MAUI's
current platform minimums except for the modern document picker, which
is guarded by the compatibility path.

### Validation

- Essentials built for `net10.0-ios26.0` and `net10.0-maccatalyst26.0`
with no warnings or errors.
- Core built for both Apple TFMs with no warnings or errors.
- Core device tests compiled for iOS simulator and Mac Catalyst with no
warnings or errors.
- Apple runtime execution remains for CI/macOS validation, particularly
custom file-type filtering and stream-backed font registration.

### Issues Fixed

N/A — resolves TODO-linked deprecated API usage.

---------

Co-authored-by: Shane Neuville <5375137+PureWeen@users.noreply.github.com>
Co-authored-by: PureWeen <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Sep 15, 2026
<!-- Please let the below note in for people that find this PR -->
> [!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](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

Migrates three deprecated Apple platform API usages while preserving
behavior across MAUI's supported iOS 13+ and Mac Catalyst 15+ versions:

- Creates `SFSafariViewController` with
`SFSafariViewControllerConfiguration`, explicitly retaining
`EntersReaderIfAvailable = false`.
- Uses the `UniformTypeIdentifiers.UTType` document-picker API on iOS
and Mac Catalyst 14+, while retaining the legacy string-based
constructor for iOS 13 and when no custom identifier resolves. `asCopy:
false` preserves the existing open-in-place behavior.
- Registers embedded fonts from file URLs with process scope instead of
the obsolete graphics-font registration API. Stream-backed resources are
copied into a SHA-256 content-addressed cache under the temporary
directory and retained for the process lifetime because Core Text uses
the URL as the font's backing store; cache entries are reused and newly
created entries are removed if registration fails.
- Adds an Apple device test covering registration, resolution, and glyph
measurement of an embedded font resource.

There are no public API changes. The replacement APIs predate MAUI's
current platform minimums except for the modern document picker, which
is guarded by the compatibility path.

### Validation

- Essentials built for `net10.0-ios26.0` and `net10.0-maccatalyst26.0`
with no warnings or errors.
- Core built for both Apple TFMs with no warnings or errors.
- Core device tests compiled for iOS simulator and Mac Catalyst with no
warnings or errors.
- Apple runtime execution remains for CI/macOS validation, particularly
custom file-type filtering and stream-backed font registration.

### Issues Fixed

N/A — resolves TODO-linked deprecated API usage.

---------

Co-authored-by: Shane Neuville <5375137+PureWeen@users.noreply.github.com>
Co-authored-by: PureWeen <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Sep 18, 2026
<!-- Please let the below note in for people that find this PR -->
> [!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](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

Migrates three deprecated Apple platform API usages while preserving
behavior across MAUI's supported iOS 13+ and Mac Catalyst 15+ versions:

- Creates `SFSafariViewController` with
`SFSafariViewControllerConfiguration`, explicitly retaining
`EntersReaderIfAvailable = false`.
- Uses the `UniformTypeIdentifiers.UTType` document-picker API on iOS
and Mac Catalyst 14+, while retaining the legacy string-based
constructor for iOS 13 and when no custom identifier resolves. `asCopy:
false` preserves the existing open-in-place behavior.
- Registers embedded fonts from file URLs with process scope instead of
the obsolete graphics-font registration API. Stream-backed resources are
copied into a SHA-256 content-addressed cache under the temporary
directory and retained for the process lifetime because Core Text uses
the URL as the font's backing store; cache entries are reused and newly
created entries are removed if registration fails.
- Adds an Apple device test covering registration, resolution, and glyph
measurement of an embedded font resource.

There are no public API changes. The replacement APIs predate MAUI's
current platform minimums except for the modern document picker, which
is guarded by the compatibility path.

### Validation

- Essentials built for `net10.0-ios26.0` and `net10.0-maccatalyst26.0`
with no warnings or errors.
- Core built for both Apple TFMs with no warnings or errors.
- Core device tests compiled for iOS simulator and Mac Catalyst with no
warnings or errors.
- Apple runtime execution remains for CI/macOS validation, particularly
custom file-type filtering and stream-backed font registration.

### Issues Fixed

N/A — resolves TODO-linked deprecated API usage.

---------

Co-authored-by: Shane Neuville <5375137+PureWeen@users.noreply.github.com>
Co-authored-by: PureWeen <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Sep 21, 2026
<!-- Please let the below note in for people that find this PR -->
> [!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](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

Migrates three deprecated Apple platform API usages while preserving
behavior across MAUI's supported iOS 13+ and Mac Catalyst 15+ versions:

- Creates `SFSafariViewController` with
`SFSafariViewControllerConfiguration`, explicitly retaining
`EntersReaderIfAvailable = false`.
- Uses the `UniformTypeIdentifiers.UTType` document-picker API on iOS
and Mac Catalyst 14+, while retaining the legacy string-based
constructor for iOS 13 and when no custom identifier resolves. `asCopy:
false` preserves the existing open-in-place behavior.
- Registers embedded fonts from file URLs with process scope instead of
the obsolete graphics-font registration API. Stream-backed resources are
copied into a SHA-256 content-addressed cache under the temporary
directory and retained for the process lifetime because Core Text uses
the URL as the font's backing store; cache entries are reused and newly
created entries are removed if registration fails.
- Adds an Apple device test covering registration, resolution, and glyph
measurement of an embedded font resource.

There are no public API changes. The replacement APIs predate MAUI's
current platform minimums except for the modern document picker, which
is guarded by the compatibility path.

### Validation

- Essentials built for `net10.0-ios26.0` and `net10.0-maccatalyst26.0`
with no warnings or errors.
- Core built for both Apple TFMs with no warnings or errors.
- Core device tests compiled for iOS simulator and Mac Catalyst with no
warnings or errors.
- Apple runtime execution remains for CI/macOS validation, particularly
custom file-type filtering and stream-backed font registration.

### Issues Fixed

N/A — resolves TODO-linked deprecated API usage.

---------

Co-authored-by: Shane Neuville <5375137+PureWeen@users.noreply.github.com>
Co-authored-by: PureWeen <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Sep 27, 2026
<!-- Please let the below note in for people that find this PR -->
> [!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](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

Migrates three deprecated Apple platform API usages while preserving
behavior across MAUI's supported iOS 13+ and Mac Catalyst 15+ versions:

- Creates `SFSafariViewController` with
`SFSafariViewControllerConfiguration`, explicitly retaining
`EntersReaderIfAvailable = false`.
- Uses the `UniformTypeIdentifiers.UTType` document-picker API on iOS
and Mac Catalyst 14+, while retaining the legacy string-based
constructor for iOS 13 and when no custom identifier resolves. `asCopy:
false` preserves the existing open-in-place behavior.
- Registers embedded fonts from file URLs with process scope instead of
the obsolete graphics-font registration API. Stream-backed resources are
copied into a SHA-256 content-addressed cache under the temporary
directory and retained for the process lifetime because Core Text uses
the URL as the font's backing store; cache entries are reused and newly
created entries are removed if registration fails.
- Adds an Apple device test covering registration, resolution, and glyph
measurement of an embedded font resource.

There are no public API changes. The replacement APIs predate MAUI's
current platform minimums except for the modern document picker, which
is guarded by the compatibility path.

### Validation

- Essentials built for `net10.0-ios26.0` and `net10.0-maccatalyst26.0`
with no warnings or errors.
- Core built for both Apple TFMs with no warnings or errors.
- Core device tests compiled for iOS simulator and Mac Catalyst with no
warnings or errors.
- Apple runtime execution remains for CI/macOS validation, particularly
custom file-type filtering and stream-backed font registration.

### Issues Fixed

N/A — resolves TODO-linked deprecated API usage.

---------

Co-authored-by: Shane Neuville <5375137+PureWeen@users.noreply.github.com>
Co-authored-by: PureWeen <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Sep 27, 2026
<!-- Please let the below note in for people that find this PR -->
> [!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](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Description of Change

Migrates three deprecated Apple platform API usages while preserving
behavior across MAUI's supported iOS 13+ and Mac Catalyst 15+ versions:

- Creates `SFSafariViewController` with
`SFSafariViewControllerConfiguration`, explicitly retaining
`EntersReaderIfAvailable = false`.
- Uses the `UniformTypeIdentifiers.UTType` document-picker API on iOS
and Mac Catalyst 14+, while retaining the legacy string-based
constructor for iOS 13 and when no custom identifier resolves. `asCopy:
false` preserves the existing open-in-place behavior.
- Registers embedded fonts from file URLs with process scope instead of
the obsolete graphics-font registration API. Stream-backed resources are
copied into a SHA-256 content-addressed cache under the temporary
directory and retained for the process lifetime because Core Text uses
the URL as the font's backing store; cache entries are reused and newly
created entries are removed if registration fails.
- Adds an Apple device test covering registration, resolution, and glyph
measurement of an embedded font resource.

There are no public API changes. The replacement APIs predate MAUI's
current platform minimums except for the modern document picker, which
is guarded by the compatibility path.

### Validation

- Essentials built for `net10.0-ios26.0` and `net10.0-maccatalyst26.0`
with no warnings or errors.
- Core built for both Apple TFMs with no warnings or errors.
- Core device tests compiled for iOS simulator and Mac Catalyst with no
warnings or errors.
- Apple runtime execution remains for CI/macOS validation, particularly
custom file-type filtering and stream-backed font registration.

### Issues Fixed

N/A — resolves TODO-linked deprecated API usage.

---------

Co-authored-by: Shane Neuville <5375137+PureWeen@users.noreply.github.com>
Co-authored-by: PureWeen <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 2, 2026
@github-actions github-actions Bot added this to the .NET 10 SR12 milestone Oct 21, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info platform/ios platform/macos macOS / Mac Catalyst s/agent-approved AI agent recommends approval - PR fix is correct and optimal s/agent-fix-pr-picked AI could not beat the PR fix - PR is the best among all candidates s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants