Skip to content

Replace deprecated iOS OpenUrl#28160

Merged
jfversluis merged 2 commits intomainfrom
fix-25602
Mar 10, 2025
Merged

Replace deprecated iOS OpenUrl#28160
jfversluis merged 2 commits intomainfrom
fix-25602

Conversation

@jfversluis
Copy link
Copy Markdown
Member

Description of Change

The previously used OpenUrl call was deprecated back in iOS 10. The new call, in the .NET bindings an overload, is already also supported since iOS 10: https://developer.apple.com/documentation/uikit/uiapplication/open(_:options:completionhandler:)

Since we support iOS 12.2 and up we can safely just replace the whole call without checking for iOS versions.

Issues Fixed

Fixes #25602

@jfversluis jfversluis added the area-blazor Blazor Hybrid / Desktop, BlazorWebView label Mar 4, 2025
@jfversluis jfversluis added this to the .NET 9 SR5 milestone Mar 4, 2025
Copilot AI review requested due to automatic review settings March 4, 2025 12:42
@jfversluis jfversluis requested a review from a team as a code owner March 4, 2025 12:42
@jfversluis jfversluis requested a review from mattleibow March 4, 2025 12:42
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.

PR Overview

This PR replaces the deprecated iOS OpenUrl call with the new overload that supports iOS 12.2 and later.

  • Replaces the deprecated OpenUrl usage with the new overload including options and a null completion handler.
  • Removes the now redundant warning suppression pragmas.

Reviewed Changes

File Description
src/BlazorWebView/src/Maui/iOS/IOSWebViewManager.cs Updated the OpenUrl call to use the modern overload compliant with iOS 12.2+

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

@github-project-automation github-project-automation bot moved this from Ready To Review to Changes Requested in MAUI SDK Ongoing Mar 4, 2025
@jfversluis
Copy link
Copy Markdown
Member Author

jfversluis commented Mar 4, 2025

Yeah for sure! Good AI! Lets see if we validate if this actually works then I'll improve it more. Addressed review feedback

@jfversluis jfversluis moved this from Changes Requested to Ready To Review in MAUI SDK Ongoing Mar 5, 2025
@PureWeen PureWeen modified the milestones: .NET 9 SR5, .NET 9 SR6 Mar 7, 2025
@jfversluis jfversluis dismissed mattleibow’s stale review March 7, 2025 21:47

Feedback addressed

@jfversluis jfversluis merged commit 42dd837 into main Mar 10, 2025
123 checks passed
@jfversluis jfversluis deleted the fix-25602 branch March 10, 2025 15:23
@github-project-automation github-project-automation bot moved this from Ready To Review to Done in MAUI SDK Ongoing Mar 10, 2025
rmarinho pushed a commit that referenced this pull request Mar 11, 2025
* Replace deprecated iOS OpenUrl

* Add failure logging
@github-actions github-actions bot locked and limited conversation to collaborators Apr 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-blazor Blazor Hybrid / Desktop, BlazorWebView

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Blank target links no longer works on iOS 18 in BlazorWebView

5 participants