Were you able to figure this out? I found two related threads;https://forums.developer.apple.com/thread/68694https://bugs.webkit.org/show_bug.cgi?id=140205and a post https://medium.com/@flexaddicted/how-to-set-wkwebview-cookie-accept-policy-d8a2d3b77420
Post
Replies
Boosts
Views
Activity
Assuming the website you are loading uses User-Agent to change content/layout/presentation the following will work.
let config = WKWebViewConfiguration()
if #available(iOS 13.0, *) {
/**
In iOS 13 and above WKWebViews in iPad has the ability to render desktop versions of web pages.
One of the properties they change to support this is the User-Agent.
Therefore forcing the WKWebView to load the mobile version.
*/
let pref = WKWebpagePreferences.init()
pref.preferredContentMode = .mobile
config.defaultWebpagePreferences = pref
}
_webView = WKWebView.init(frame: CGRect.zero, configuration: config)
You can get the Javascript to work by adding the WKWebView to the view hierarchy. You can hide the web view by giving it a zero rect.
let config = WKWebViewConfiguration()
_webView = WKWebView.init(frame: CGRect.zero, configuration: config)
instanceOfYourView.addSubview(_webView!)
Your app will not be removed. However, functionality is not guaranteed for deprecated APIs.
Earlier I mentioned that @beruta's solution worked for me but it started failing again. What worked for me is cleaning Xcode project build files.
"About This Mac" -> Storage -> Manage -> Developer
This is also a neat way to clear up some space when you are running out.
I still see the problem in XCode 13.2.1. However, this only happens if I use the command line. Randomly fails with this error in pods.
xcodebuild archive
@awsw please see https://developer.apple.com/library/archive/technotes/tn2339/_index.html#//apple_ref/doc/uid/DTS40014588-CH1-WHAT_KEYS_CAN_I_PASS_TO_THE_EXPORTOPTIONSPLIST_FLAG_. You need to create the plist manually.
I have tried the most common suggestion of running it from command line but no luck.
Command:
open /Users/username/Downloads/Xcode.app/Contents/MacOS/Xcode
Error:
Xcode[3762:21719] [MT] IDEPackageInstallerHelper: Generic message for error: Error Domain=PKInstallErrorDomain Code=201 "An error occurred establishing a connection to the installation service." UserInfo={NSLocalizedDescription=An error occurred establishing a connection to the installation service.}
I'm unable to download and install command line tools separately. It complains about the macOS version.
I share the same sentiment as @zumacinsmity. On a regular day I support versions of the apps that are developed using older versions of Xcode. At least one major version older. In my case I was trying to install Xcode 13.2.1
Before running the open command I ran the following and I was able to use Xcode 13.2.1 in Venura.
sudo xcode-select -s /Users/username/Downloads/Xcode.app