Link Presentation

RSS for tag

Fetch, provide, and present rich links in your app using Link Presentation.

Link Presentation Documentation

Posts under Link Presentation tag

2 Posts
Sort by:
Post not yet marked as solved
0 Replies
228 Views
When my site is being sent, the OG tags are being ignored. But if I use local host open graph checker, which rips the head from my page and send it they work. The Tags work on all other platform I've tested on (Android, Facebook messenger, Slack and twitter). The site is Next.js based. <meta property="og:title" content="Title here"> <meta property="og:image" content="URL to image here">
Posted
by
Post marked as solved
1 Replies
198 Views
I am creating a Safari App Extension for users to save web links and quotes to my app. I would like to cache web page metadata when links are saved by the extension. I am using a context menu command to capture information with the code below. override func contextMenuItemSelected( withCommand command: String, in page: SFSafariPage, userInfo: [String : Any]? = nil) { switch command { case "sendToApp": Task { guard let properties = await page.properties(), let pageURL = properties.url else { return }                 let provider = LPMetadataProvider()                 provider.timeout = 0.01                 os_log("*** Starting metadata call ***")                 let metadata = try? await provider.startFetchingMetadata(for: pageURL)                 os_log("*** Continued past metadata call ***") // ...             }         } I get the log: *** Starting metadata call *** LPMetadataProvider<1>: start fetching for URL ...but I am never seeing the log "*** Continued past metadata call ***" I wonder if the task is being killed for some reason? I thought maybe async code was an issue in SFSafariExtensionHandler, but the first await call in the guard passes successfully. I thought that the default timeout of 30s on LPMetadataProvider may be too great, but it still fails with a tiny timeout of 0.01s. I have added com.apple.security.network.client to the entitlements of the extension. Is there something I am missing please?
Posted
by