开发者

Where to look for documentation regarding iPhone telephone app

I'm new to the iPhone sdk and I'd like to know wh开发者_如何学JAVAat 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!


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜