     override func viewDidLoad() {
         super.viewDidLoad()
 
-        if #available(iOS 9.0, *) {
-            // use WKWebView on iOS 9.0 and later
-            self.initialiseWebView()
-        } else {
-            // use UIView
-            self.initaliseLegacyWebView()
-        }
+        self.initialiseWebView()
 
         let cancelButton = UIBarButtonItem(title: "Cancel", style: UIBarButtonItemStyle.plain, target: self, action: #selector(HPPViewController.closeView))
         self.navigationItem.leftBarButtonItem = cancelButton


        self.dismiss(animated: true, completion: nil)
    }


    //MARK: - Legacy UIWebView Delegate Callbacks


    /* intercepts any URL load requests and checks the URL Scheme, if it is custom scheme 'callbackhandler' this is a message from the webpage and is reported back to the HPP Manager. */
    func webView(_ webView: UIWebView,
        shouldStartLoadWith request: URLRequest,
        navigationType: UIWebViewNavigationType) -> Bool {

            if (request.url?.scheme == "callbackhandler") {

                let message = request.url?.host!.removingPercentEncoding
                self.delegate?.HPPViewControllerCompletedWithResult!(message!)
                self.dismiss(animated: true, completion: nil)
            }
            return true
    }

    /* Start the network activity indicator when the web view is loading */
    func webViewDidStartLoad(_ webView: UIWebView) {
        UIApplication.shared.isNetworkActivityIndicatorVisible = true

    }

    /* Stop the network activity indicator when the loading finishes */
    func webViewDidFinishLoad(_ webView: UIWebView) {
        UIApplication.shared.isNetworkActivityIndicatorVisible = false

    }

    /* Stop the network activity indicator when the loading fails and report back to HPPManager */
    func webView(_ webView: UIWebView,
        didFailLoadWithError error: Error) {
            UIApplication.shared.isNetworkActivityIndicatorVisible = false
            self.delegate?.HPPViewControllerFailedWithError!(error as NSError?)
    }

}

}

/// The Web View Controller which encapsulates the management of the webivew and the interaction with the HPP web page.
class HPPViewController: UIViewController, WKNavigationDelegate,  WKUIDelegate, WKScriptMessageHandler {

    @IBOutlet var containerView : UIView? = nil

    var webView: WKWebView?

    var delegate:HPPViewControllerDelegate?

