DEV Community

Wesley de Groot
Wesley de Groot

Posted on • Originally published at wesleydegroot.nl on

Safari in SwiftUI

You started playing around with SwiftUI, and you want to present a Safari(WebView), you search in the documentation, and..., SwiftUI has no native way to display a WebView!

To use Safari (SFSafari) you need to create a custom UIViewControllerRepresentable which is needed to use ViewControllers in SwiftUI.

This post contains, 3 sections,

  1. The code in steps
  2. The code (complete)
  3. Example on how to use.

Full post on: https://wesleydegroot.nl/blog/post/Safari-in-SwiftUI

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay