Search code examples
iphonecore-telephony

Is there a way to tell if your app is being used while the user is on the phone?


There are certain portions of my app that would be better to highlight to the user if they're on the phone.

Is there a call to check to see if we're on the phone? Unfortunately, "call" is a horrible word to check for in API documents for obvious reasons.


Solution

  • The CoreTelephony Framework can tell you.

    The CTCallCenter currentCalls method returns a set of currently active cellular calls.