Can't load http authorisation website url in webview on IOS9 with swift 2

Viewed 780

I'm now to IOS development and i encounter a problem that i can't load a http authorisation site in webview, it just show blank page and nothing comes out, here is my code to load the website:

@IBAction func testhttp(sender: AnyObject) {

    let url = NSURL(string: "http://www.obee.com.au/demo/admin/index.php");
    let request = NSURLRequest(URL: url!);
    //see2 is the webview....
    see2.loadRequest(request);
}

Can anyone help me fix this problem ?

Cheers

3 Answers

Go to your plist, Right click on Information property list click add new row then add new row as app transport security system and inside this row add allow arbitrary load as yes

enter image description here

Related