I posted this question earlier but it was marked as a duplicate which in my opinion it is not. Here are the details.
I have a view that I use to access 7 URLs. Just one of these URLs does not load. The URL is correct and it loads from iOS Safari. The 6 other URLs load without problem. All URLs are http. How do I debug this? There are no error messages.
The suggestion referred to when my previous question was closed as duplicate was that I change NSAppTransportSecurity to NSAllowsArbitraryLoads YES, but that was already the case in info.plist. Is there somewhere else that I need to change ATS?
override func viewDidLoad ()
{
super.viewDidLoad ()
if Reachability.isConnectedToNetwork() == false
{
showAlert ()
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let returnNC = myStack.pop()
let vc = storyboard.instantiateViewControllerWithIdentifier(returnNC!)
self.presentViewController(vc, animated: true, completion: nil)
}
else {
let fullURL = defaults.objectForKey("URL") as? String
let url = NSURL(string: fullURL!)
let request = NSURLRequest(URL: url!)
myWebView.loadRequest(request)
}
}
func webView(webView: UIWebView!, didFailLoadWithError error: NSError!) {
print("Webview fail with error \(error)");
}