I need to show a web browser in my app. I can't use SFSafariViewController as I need to be able to authenticate with NTLM, so I'm currently using Alamofire to download the data and then displaying it in a UIWebView.
I have got the UIWebView to display the HTML via .loadHTMLString(), however the images, CSS and Javascript files are not loading. I tried setting the baseURL to the website root, however, when I do this nothing at all loads in the UIWebView, leaving it blank with no content or errors in the console.
Alamofire.request(.GET, "https://dev-moss.stpaulscatholiccollege.co.uk/sites/Students/default.aspx").authenticate(usingCredential: credential)
    .response { request, response, data, error in
        dispatch_async(dispatch_get_main_queue(), { () -> Void in
            // check for errors or bad responsecode
            if (error == nil) && (response?.statusCode == 200) {
                // load the website
                let gatewayString = "\(NSString(data: data!, encoding: NSUTF8StringEncoding))"
                self.gatewayWebView.loadHTMLString(String(NSString(data: data!, encoding: NSUTF8StringEncoding)!), baseURL: nil)
                print(gatewayString)
            }
            else {
                print("There was an error loading the website.")
            }
        })
}
Even when setting the baseURL to NSURL(string: "https://dev-moss.stpaulscatholiccollege.co.uk/") or NSURL(string: "https://dev-moss.stpaulscatholiccollege.co.uk") the print of gatewayString still spits out the website to the console however.