2

I would like to access to a Sharepoint site, but the UIWebView is blocked when Office365 try redirect me to my auth organization page. On desktop, I see a prompt with 2 text fields, but, nothing here! Here is my code, and a screenshot:

class ViewController: UIViewController, NSURLConnectionDelegate {

@IBOutlet var webView: UIWebView!
@IBOutlet var refresh: UIBarButtonItem!

override func viewDidLoad() {
    super.viewDidLoad()

    if let theURL = URL(string: "https://expertime365.sharepoint.com/sites/retail-portal-v8/Pages/default.aspx") {
        let request = URLRequest(url: theURL)

        webView.loadRequest(request)
    }
}

override func didReceiveMemoryWarning() {
    super.didReceiveMemoryWarning()
    // Dispose of any resources that can be recreated.
}

}

Here is a screenshot:

screenshot

DimaSan
  • 12,264
  • 11
  • 65
  • 75

1 Answers1

0

Have did check url which are load in your webView ?

if you not then check following link and compare with that url which are loaded in Desktop browser.

You can check with below code :

func webView(webview: UIWebView, shouldStartLoadWithRequest request: NSURLRequest, navigationType: UIWebViewNavigationType) -> Bool {
    let currentURL = request.URL.absoluteString
    print("\(currentURL)")
  }
KKRocks
  • 8,222
  • 1
  • 18
  • 84