iOS16 ShareLink URLScheme Rich Link Preview SwiftUI

258 Views Asked by At

I would like to have a button in the app that popups a ShareSheet with a link that routes to my app, via the ShareLink API. From this Apple documentation, iOS and macOS will automatically generate inline previews for links people send.

However, if creating a link to the app itself (using a URL Type/Scheme), how can I get the fancy preview to work? I added an icon to my URL scheme but it doesn't seem to do anything.

I am using the SwiftUI and the ShareLink API.

I tried:

  1. ShareLink
  2. LinkPresentation
  3. URL Scheme
0

There are 0 best solutions below