0

I'm trying to implement web.skype.com in my WKWebView for calling someone. But a message always appears that I have to install a plugin for Skype calls. I tried to change the user agent but it doesn't work, the message still appears.

My Code:

  let url = URL (string: "https://web.skype.com/")
    var requestObj = URLRequest(url: url!)
    let userAgent = "Mozilla/10.0 (Macintosh; Intel Mac OS X 10_30_2) AppleWebKit/902.3.12 (KHTML, like Gecko) Version/99.0.2 Safari/902.3.12"
    requestObj.setValue(userAgent, forHTTPHeaderField: "User-Agent")
    webView.isUserInteractionEnabled = true
    webView.configuration.allowsAirPlayForMediaPlayback = true
    webView.configuration.allowsInlineMediaPlayback = true
    webView.configuration.allowsPictureInPictureMediaPlayback = true
    webView.customUserAgent = userAgent

 webView.load(requestObj)
Tamás Sengel
  • 55,884
  • 29
  • 169
  • 223
Akif Demirezen
  • 191
  • 1
  • 1
  • 13

1 Answers1

1

You cannot install plugins neither in Safari for iOS (other than Content Blocking Safari Extensions), nor in a WKWebView/UIWebView.

You should redirect users to the Skype app if you want them to use it for calling. Here is an answer under another question that addresses that issue.

Tamás Sengel
  • 55,884
  • 29
  • 169
  • 223
  • you mean, it doesn't work normally but I can do this by using content blocking extension .Right ? – Akif Demirezen Mar 21 '18 at 14:16
  • @AkifDemirezen No, you cannot use content blocking extensions for calling. I just added that as a note that extensions **do** exist for iOS Safari. – Tamás Sengel Mar 21 '18 at 14:18