Website Links

External links and in-app browsing: Link component, openURL environment, SFSafariViewController, URL handling. Use when opening URLs, adding web links, or embedding an in-app browser. Triggers: Link, openURL, SFSafariViewController, URL, website, browser.

abdullah4ai Updated 11 repo stars

File contents

Website Links

WEBSITE LINKS:

  • Link("Visit Website", destination: URL(string: "https://...")!) for simple links
  • Or @Environment(.openURL) var openURL; Button { openURL(url) } for custom styling
  • No permissions needed for external URLs
  • Safari opens by default; use SFSafariViewController via UIViewControllerRepresentable for in-app browser
  • Validate URL before force-unwrapping: guard let url = URL(string:) else { return }

abdullah4ai/apple-dev-docs commit 033baf1fe8

Frequently asked questions

npx get-skill add abdullah4ai/website-links