let url = NSURL (string: "http://google.com");
let requestObj = NSURLRequest(URL: url!);
myWebView.loadRequest(requestObj);
Loading url with
App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.
The page doesn't load in the webview.
What should I do?
ios swift webview
It's a self-answer.
If you enter Target Settings, there is a menu called Custom iOS Target Properties. From there, mouse over the area shown in the image below to create a + button.
After pressing the button, you can add a menu called App Transport Security Setting
as shown below.
Then change Allow Arbitrary Loads to Yes.
© 2024 OneMinuteCode. All rights reserved.