Monday, April 22, 2024
HomeiOS Developmentswift - WKWebView not loading in iOS 17.5 beta | Xcode 15.4...

swift – WKWebView not loading in iOS 17.5 beta | Xcode 15.4 beta


This code has functioned flawlessly for years, however after updating to Xcode 15.4 (Beta 1), the WebView just isn’t rendering the content material. I’ve up to date to Xcode 15.4 as a result of I am having this difficulty on Xcode cloud since Xcode 15 launched. As a short lived measure, I’ve switched the URL to google.com for testing functions.

That is the code that I am utilizing on my mission to load a URL however nothing is loading on iOS 17.5 (simulator), and it does load on iOS 17.4 (simulator and actual gadget).

import WebKit
import SwiftUI

struct LoginView: View {

var physique: some View {
    NavigationView {
        VStack {
            WebView(urlString: "https://google.com")
                .body(minWidth: 0, maxWidth: .infinity, minHeight: 0, maxHeight: .infinity)
        }
        .navigationTitle("Net View")
    }
}

#Preview {
    LoginView()
}

struct WebView: UIViewRepresentable {

let urlString: String

func makeUIView(context: Context) -> WKWebView {
    let webView = WKWebView()
    webView.navigationDelegate = context.coordinator
    return webView
}

func updateUIView(_ uiView: WKWebView, context: Context) {
    if let url = URL(string: urlString) {
        let request = URLRequest(url: url)
        uiView.load(request)
    }
}
}

iPhone 15 Professional Max iOS 17.5 (Simulator)

iPhone 15 Pro Max iOS 17.5

iPhone 15 Professional Max iOS 17.4 (Simulator)

iPhone 15 Pro Max iOS 17.4

Xcode Cloud UITests utilizing iPhone 15 Professional Max iOS 17.4 (Simulator)

I additionally observed that Xcode Cloud has been having issues rendering the WebView as you’ll be able to see within the picture under:

Xcode Cloud UITests



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments