Reputation: 38960
I'm new to the iPhone sdk and I'd like to know what kinds of functionality and documentation exist for the iPhone telephone app. Ie how can you make calls/get any information about calls for your personal iPhone app?
Thanks!
Upvotes: 0
Views: 144
Reputation: 18132
There is no API in the current iOS SDK to retrieve call history or make calls from within your app. There is an Address Book API (which will let you retrieve all the details for contacts in the iPhone Address Book, including phone numbers, etc.) but I don't think this is what you want. If you wanted to launch the Phone app and initiate a phone call from your app, you could do the following:
NSString *phoneNumber = @"8885555";
NSString *phoneURLString = [NSString stringWithFormat:@"tel:%@", phoneNumber];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:phoneURLString]];
Note that this will close your app and open the Phone app.
Upvotes: 3