swiftwebviewskype

open Skype in a Swift webview


I want to open Skype in a Swift webview by just using a URL. Similar to something like the URL Scheme's provided by Apple for opening Apple Mail mailTo:// or telephone tel://.

1.) must i use the skype-API or just check if skype is installed with

@IBAction func skypeMe(sender: AnyObject) {
   let installed = UIApplication.sharedApplication().canOpenURL(NSURL(string: "skype:")!)
   if installed {
    UIApplication.sharedApplication().openURL(NSURL(string: "skype:echo123?call")!)
   } else {
      UIApplication.sharedApplication().openURL(NSURL(string: "https://itunes.apple.com/in/app/skype/id304878510?mt=8")!)
   }
}

2.) how must i call this? (skype:username?call)

3.) my skype-login should be called automatically

4.) i want to choose the addressee

Is that possible?


Solution

  • This link could help.

    UIApplication.sharedApplication().openURL launches skype automatically

    Try openURL(NSURL(string: "skype:")!) It may launch skype, where you could

    choose the addresses. Or may not launch.