TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Dec 2014 |
Maintained by Joseph.
PhoneKit is an easy to use extension/wrapper of the Twilio Client iOS SDK for easily making/receiving VoIP calls from inside your iOS app.
Unfortunately, the Twilio Client SDK requires all client-side apps to have a custom server-side counterpart that issues your app capability tokens and hosts TwiML to handle the calls. To hopefully make your life easier, I've created the repo above to address the server-side needs of the most common use cases for Twilio Client. It can be easily deployed to your heroku account in about a minute – simply follow the readme on that repo to get the server set up.
To run the example project, clone the repo, and run pod install
from the Example directory first. Then, change the value of kServerBaseURL
at the top of PKTViewController.m
to point to auth.php
on your server.
After starting the app, you can press "Call" immediately to hear a simple demo message. To call a real phone, you must first set the caller ID field to a number you have verified with Twilio. Then simply type the callee's phone number (don't worry about the formatting) into the Callee text field and press Call.
After grabbing the token from auth.php, hand it to the Phone:
[PKTPhone sharedPhone].capabilityToken = token;
Set an optional caller ID:
[PKTPhone sharedPhone].callerId = @"1(555)867-5309";
I recommend using the provided PKTCallViewController for your call UI:
self.callViewController = [PKTCallViewController new];
[PKTPhone sharedPhone].delegate = self.callViewController;
Make a call!
[[PKTPhone sharedPhone] call:@"1 555-234-5678"];
Joseph Constantakis, [email protected]
PhoneKit is available under the MIT license. See the LICENSE file for more info.