-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
URLをOGPカード表示したい #18
Comments
OG データをダウンロードして、自前でレンダリングする必要があるかも。 |
CSS が得意じゃないから、自前でレンダリングは少し厳しい、、 |
macOS インスタンスを使うとすれば、LinkPresentation を使うだけで情報の取得は可能ですね。 import LinkPresentation
try await run(originalURL: URL(string: "https://github.com/treastrain/tretjapannfcreader")!)
@MainActor
func run(originalURL: URL) async throws {
let metadataProvider = LPMetadataProvider()
let metadata = try await metadataProvider.startFetchingMetadata(for: originalURL)
// https://github.com/treastrain/TRETJapanNFCReader
let url = metadata.url
// https://github.com/treastrain/tretjapannfcreader
let originalURL = metadata.originalURL
// "treastrain/TRETJapanNFCReader: NFC (FeliCa) Reader for iOS 13 later Core NFC / Japanese e-Money prepaid or identification cards"
let title = metadata.title
let icon = try await metadata.iconProvider?.loadItem(forTypeIdentifier: "public.image") as! Data
let image = try await metadata.imageProvider?.loadItem(forTypeIdentifier: "public.image") as! Data
} |
そんなフレームワークあるのwww |
あっ それなのですが、すでに ios_osushi 下のリポジトリでは使えるようにしていただいております… https://github.com/ios-osushi/release-subscriptions/actions/runs/2258428022 |
概要
URL を OGP カード表示したい。
The text was updated successfully, but these errors were encountered: