I am developing an app in Swift for iPad that makes use of facetime.
I know Apple introduced App projection (described about 3/4 of way down page) (where one app can "project" itsself into another) in iOS 8. Is facetime capable of this, and if so, how do I access this functionality in swift?
If not, how does one use facetime from an app programatically otherwise? I found this question about the Swift API that explained how to do it in objective C. How do I adapt that code to work in swift? When I use it as written, I get the error "Expected ; seperator"
Barring the above two, is there any other or better ways to program facetime functionality for a swift app?
Thanks!
In the FaceTime app tap the plus button and type the person's phone number or email address. 2. Tap the number or address, then tap Audio or Video .
The answer is yes! FaceTime is free whether you or the other person is outside the country. You can make international FaceTime calls and they are free as long as you have internet connectivity. But make sure to connect your iPhone to a Wi-Fi network.
Open the FaceTime app, and enter the phone number or email address you want to call. If the person you want to call is in your Contacts app, you can simply type in the name. Then, just click the Audio button to make an audio-only call. During a call, you can switch to and from video calling.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With