Post

Replies

Boosts

Views

Activity

Reply to WKWebView in SwiftUI iOS 14 and Xcode 12
I am in a similar boat where I have a SwiftUI app that wraps a WKWebView in UIViewRepresentable. For your goal of updating font-family and size, I am using a WKUserScript to inject custom CSS to change the font-family and size. This is working OK for me on both iOS 13 and 14. Sample code that creates my WKWebView in my UIViewRepresentable class.:     lazy var webView: WKWebView = {         guard let path = Bundle.main.path(forResource: "style", ofType: "css"),           let cssString = try? String(contentsOfFile: path).components(separatedBy: .newlines).joined()         else {           return WKWebView()         }         let source = """            var style = document.createElement('style');            style.innerHTML = '\(cssString)';            document.head.appendChild(style);         """         let userScript = WKUserScript(source: source, injectionTime: .atDocumentEnd, forMainFrameOnly: true)         let userContentController = WKUserContentController()         userContentController.addUserScript(userScript)         let configuration = WKWebViewConfiguration()         configuration.userContentController = userContentController         let webView = WKWebView(frame: .zero, configuration: configuration)         return webView     }() However, I have a different problem - now my WKWebView doesn't render for about 30 seconds on iOS 14. I have no idea, and stumbled upon this question trying to research an answer. Let me know if you have encountered this.
Jul ’20
Reply to Safari, SFSafariViewController, and WKWebView on iOS 14 b3 takes ~30 seconds to load any web content
Update: I am experiencing the same thing on Xcode 12.0 beta 4 (12A8179i) in the simulator. I had someone try it on an actual iOS 14 b3 and b4 device and they said it's working fine for them, so it seems to be a simulator-only issue. I'm still very confused why I seem to be the only one experiencing this. I filed FB8195126 for this. Its current status is "Recent Similar Reports: Less than 10."
Aug ’20
Reply to Xcode 12 GM seed uses 100% CPU
I might be having the same problem. Ever since installing the Xcode 12 GM, I have two processes, "***" and "pkd" which are eating up 80% CPU each. The computer is completely unresponsive, and frequent beach balls. Numerous apps are Not Responding and need to be forced killed. Even after rebooting, it resumes. Near top-of-the-line 2019 MacBook Pro 16", i9, 32 GB of RAM running Catalina 10.15.6. My Console was filled with messages like this: error 09:32:52.330888-0600 pkd Failed to create LSPlugInKitProxy object (after sorting) for <private> (853216) The only way I was able to resolve it was to rm -rf /Applications/Xcode.app and reboot, and even then I had to reset the SMC. I tried re-installing Xcode 12 GM last night and it went back to the same thing. I'm going to try again this morning but I'm pretty nervous. Are you seeing those same two processes @gtrichar?
Sep ’20
Reply to Animation for DisclosureGroup open/close
Building on @BabyJ's answer, here's how you can get the entire row to be tappable: DisclosureGroup(isExpanded: $guestsExpanded){ ForEach(model.guests) { ... } } label: { &#9;&#9;HStack { &#9;&#9;Button("Guests") { &#9;&#9;withAnimation { &#9;&#9;guestsExpanded.toggle() &#9;&#9;&#9;&#9;&#9;&#9;} &#9;&#9;} &#9;&#9;&#9;.foregroundColor(.primary) &#9;&#9;&#9;Spacer() &#9;&#9;} &#9;&#9;.contentShape(Rectangle()) }
Nov ’20