Post

Replies

Boosts

Views

Activity

Sandbox and WKWebView
When I run this program on iphone ( ios 18.0 with Xcode 16.0 (16A242d) ) I get these warnings from iphone ( not from the preview running ) : Could not create a sandbox extension for '/var/containers/Bundle/Application/7BAE-82-4A3-98D-75A49B/xxxx.app' Updated list with error: DownloadFailed Updated list with error: DownloadFailed Updated list with error: DownloadFailed Updated list with error: DownloadFailed Updated list with error: DownloadFailed The programe is simple : import SwiftUI import WebKit struct ContentView: View { let htmlContent = """ <html> <head> <meta content="text/html; charset=UTF-8" http-equiv="content-type"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> </head> <body> <h1>Hello, World!</h1> <p>This is a simple webpage displayed in a WebView.</p> </body> </html> """ var body: some View { WebView(htmlContent: htmlContent) .edgesIgnoringSafeArea(.all) } } struct WebView: UIViewRepresentable { let htmlContent: String func makeUIView(context: Context) -> WKWebView { let webView = WKWebView() webView.loadHTMLString(htmlContent, baseURL: nil) return webView } func updateUIView(_ uiView: WKWebView, context: Context) { // No need to update the view since the content is static } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } } any reason for this ? otherwise the program is running correctly, but is this a bug or a programming problem?
1
0
429
Sep ’24