Skip to content

Commit

Permalink
Ensure that LinkPresentation framework is called on main thread (#595)
Browse files Browse the repository at this point in the history
Task/Issue URL: https://app.asana.com/0/1201493110486074/1206113035171145/f

Description:
Ensure that LinkPresentation's metadata lookup API is called on main thread.
Otherwise, it would keep crashing on iOS 15.
  • Loading branch information
ayoy authored and samsymons committed Dec 7, 2023
1 parent cbadef1 commit cd89124
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Bookmarks/FaviconsFetcher/FaviconFetcher.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public final class FaviconFetcher: NSObject, FaviconFetching {
let metadataFetcher = LPMetadataProvider()

// Allow LinkPresentation to fail so that we can fall back to fetching hardcoded paths
let metadata: LPLinkMetadata? = await {
let metadata: LPLinkMetadata? = await { @MainActor in
if #available(iOS 15.0, macOS 12.0, *) {
var request = URLRequest(url: url)
request.attribution = .user
Expand Down

0 comments on commit cd89124

Please sign in to comment.