josetovar14 | Posts: 2

WebView signature iOS - WKWebView

0 votes

Hello, I am implementing signature for an iOs application, I am showing with WKWebView.

but I don't know how to hide or close this WKWebView when the user has finished signing. used WKWebView delegates, but when you go from the signature view to the "Thank you" view, not  call none this delegates 

 

How can I know when the user has signed and can close the webView.?

 

  func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {

        print("finish to load")

    }

    

    func webView(_ webView: WKWebView, didStartProvisionalNavigation navigation: WKNavigation!) {

        print("Start to load")

    }

    

    func webView(_ webView: WKWebView, runJavaScriptAlertPanelWithMessage message: String, initiatedByFrame frame: WKFrameInfo, completionHandler: @escaping () -> Void) {

        print("text")

        completionHandler()

    }

 

    func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, decisionHandler: @escaping (WKNavigationActionPolicy) -> Void) {

       

        print("text 2")

        decisionHandler(.allow)

    }

    

    func webView(_ webView: WKWebView, createWebViewWith configuration: WKWebViewConfiguration, for navigationAction: WKNavigationAction, windowFeatures: WKWindowFeatures) -> WKWebView? {

        print("text 3")

        return nil

    }

 

 


Duo_Liang | Posts: 3776

Reply to: WebView signature iOS - WKWebView

0 votes

Hi josetovar14,

 

I believe you are rendering the HTML (loading Signing Ceremony URL) in a WebView versus using our native iOS SDK, right? In this case, you might need to create your own HTML and embed the Signing Ceremony into an iFrame (maybe a full screen iFrame), so that you can use the javascript notifier to monitor the signing process, then make post to your WebView controller. 

For embedding Signing Ceremony into an iFrame and loaded from WebView, check this code share.

 

Duo

 


josetovar14 | Posts: 2

Reply to: WebView signature iOS - WKWebView

0 votes

it worked, Thanks a lot...  I imagine that for Android it is the same?  there is Sample on Android Demo.. ? 


Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off