Marino Faggiana %!s(int64=6) %!d(string=hai) anos
pai
achega
affcc332e5
Modificáronse 1 ficheiros con 6 adicións e 1 borrados
  1. 6 1
      iOSClient/Richdocument/NCRichdocument.swift

+ 6 - 1
iOSClient/Richdocument/NCRichdocument.swift

@@ -59,7 +59,12 @@ class NCRichdocument: NSObject, WKNavigationDelegate, WKScriptMessageHandler {
     }
     
     public func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) {
-        print("WKScriptMessage");
+        
+        if (message.name == "RichDocumentsMobileInterface") {
+            if message.body as! String == "close" {
+                print("\(message.body)")
+            }
+        }
     }
     
     public func webView(_ webView: WKWebView, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {