How to make facetime call from Swift?

Allow me to answer my own question...

I originally used the following code

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"facetime://tel-number"]];

With the help of this question, and the Apple Facetime API docs, I determined that the proper code was :

UIApplication.sharedApplication().openURL(NSURL(string: "facetime://tel-number"))

I hope this helps anyone else in the future.


A bit more self-contained solution in Swift:

private func facetime(phoneNumber:String) {
  if let facetimeURL:NSURL = NSURL(string: "facetime://\(phoneNumber)") {
    let application:UIApplication = UIApplication.sharedApplication()
    if (application.canOpenURL(facetimeURL)) {
      application.openURL(facetimeURL);
    }
  }
}

Now, you should be able to use facetime("7178881234") to make a facetime call.