Post

Replies

Boosts

Views

Activity

Help by Swift Playground App
I would like to program an app in Swift Playground that displays WhatsApp Web in a webview, so to speak. But I keep seeing an error like in the screenshot. My Code: import SwiftUI import WebKit import PlaygroundSupport struct WebView: UIViewRepresentable { let url: URL func makeUIView(context: Context) -> WKWebView { let webView = WKWebView() let request = URLRequest(url: url) webView.load(request) return webView } func updateUIView(_ webView: WKWebView, context: Context) { } } struct ContentView: View { var body: some View { WebView(url: URL(string: "https://web.whatsapp.com")!) .edgesIgnoringSafeArea(.all) } } PlaygroundPage.current.setLiveView(ContentView())
0
0
199
Oct ’24