Skip to content

[net11.0] Obsolete unused iOS image source extensions - #38107

Merged
kubaflo merged 1 commit into
net11.0from
jfversluis-validate-imageview-api-obsoletion
Sep 2, 2026
Merged

kubaflo merged 1 commit into
net11.0from
jfversluis-validate-imageview-api-obsoletion

Conversation

@jfversluis

@jfversluis jfversluis commented Sep 2, 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

Marks the shipped iOS and Mac Catalyst ImageViewExtensions.UpdateSource and UpdateSourceAsync methods obsolete without removing or changing their behavior.

The synchronous helper is only a two-step convenience API; callers can set UIImageView.Image directly and call UpdateIsAnimationPlaying(IImageSourcePart). For asynchronous loading, the supported public extension point is ImageSourcePartLoader.UpdateImageSourceAsync() with an IImageSourcePartSetter, which is the same abstraction used by current MAUI image, image button, button, and swipe-item handlers.

Repository history shows these helpers have had no internal callers since the image-loading pipeline moved to ImageSourcePartLoader. Public GitHub code search found no third-party calls to the UIImageView.UpdateSourceAsync overload outside MAUI source forks. The stale TODOs are removed as resolved.

API review

This is warning-only obsoletion of two shipped platform APIs in .NET 11. Their signatures remain in the iOS and Mac Catalyst shipped API baselines; ObsoleteAttribute metadata is not represented separately by the repository PublicAPI text format, so no baseline entries change. The replacement guidance names public, documented APIs and does not strand custom-handler consumers.

Validation

  • Targeted repository formatting completed.
  • Local Apple compilation is unavailable because this Windows host has .NET 10 Apple workloads while net11.0 targets .NET 11 Apple TFMs; iOS and Mac Catalyst CI are the platform validation gate.

Issues Fixed

Candidate TODO cleanup 13; no GitHub issue.

Direct callers can assign UIImageView.Image and update animation state, while custom handlers should use ImageSourcePartLoader for asynchronous loading.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings September 2, 2026 09:03
@github-actions

github-actions Bot commented Sep 2, 2026

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 -- 38107

Or

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

@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.

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

🟡 Changes recommended

The PR description references issue #13 (AppBar spec) which does not match the implemented change, so the metadata should be corrected to avoid misleading linkage.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review tier: Lite
Findings: 1 Low severity

New issues introduced by this change (1)
Severity Finding
Low severity src/​Core/​src/​Platform/​iOS/​ImageViewExtensions.cs — The PR description references issue #13 (AppBar spec), but the actual change here only obsoletes…
What changed in this PR

Marks two legacy iOS/MacCatalyst UIImageView-based image-source helper extension methods as obsolete (warning-only) to guide consumers toward the current ImageSourcePartLoader-based pipeline, without changing runtime behavior.

Changes:

  • Obsoleted ImageViewExtensions.UpdateSource(...) with guidance to set UIImageView.Image directly and call UpdateIsAnimationPlaying(...).
  • Obsoleted ImageViewExtensions.UpdateSourceAsync(...) with guidance to use ImageSourcePartLoader.UpdateImageSourceAsync() + IImageSourcePartSetter.
File Description
src/​Core/​src/​Platform/​iOS/​ImageViewExtensions.cs Adds Obsolete attributes/messages to two shipped UIImageView image-source helper extension methods.

@jfversluis

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

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

@kubaflo
kubaflo merged commit 3b14c7a into net11.0 Sep 2, 2026
145 of 155 checks passed
@kubaflo
kubaflo deleted the jfversluis-validate-imageview-api-obsoletion branch September 2, 2026 14:00
@github-actions github-actions Bot added this to the .NET 11.0-preview7 milestone Sep 2, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 3, 2026

This branch was previously deployed

1 inactive deployment
copilot-pat-pool — 8b021fce Deployed Sep 2, 2026 by jfversluis via conclusion #1695
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants