I know when a call is accepted applicationWillResignActive and applicationWillEnterBackground both get called. But they 开发者_开发百科seem to also get called for some other cases.
Is there a way to check if the user has ANSWERED the incoming phone call rather than decline or let it ring out.
As there maybe cases when the app gets a phone call while the app is already in the background and I need to be able to get some code to execute.(Hope I havent been to vague)
Many Thanks, -Code
Check out the Core Telephony framework, and the CTCallCenter object. I think it does what you're asking for...
https://developer.apple.com/library/ios/#documentation/NetworkingInternet/Reference/CTCallCenter/Reference/Reference.html%23//apple_ref/doc/uid/TP40009604
精彩评论