An object that retrieves metadata for a URL.
- iOS 13.0+
- macOS 10.15+
- Mac Catalyst 13.0+
Fetch Link Metadata from a URL
In the completion handler, check the error. If your user doesn’t have a network connection, the fetch can fail. If the server doesn’t respond or is too slow, the fetch can time out. Alternatively, the app may cancel the request, or an unknown error may occur.
Otherwise, use the metadata however you want, for example, to populate the title for a table view cell.
For more information about handling link presentation errors, see