Search code examples
objective-ciphoneeventsphone-call

Is it possible to get event before outgoing call in iPhone?


Is it possible to get event before an outgoing call in iPhone as it is in Android? What I want to do is to get an event after the user finished dialing, and before the outgoing call is made in order to pop up a message in some cases or call the user for some action.


Solution

  • From iOS 4 to iOS 9, you can use Cellular Call States for this purpose

    CTCallStateDialing

    The call state, before connection is established, when the user initiates the call.

    CTCallStateIncoming

    The call state, before connection is established, when a call is incoming but not yet answered by the user.

    CTCallStateConnected

    The call state when the call is fully established for all parties involved.

    CTCallStateDisconnected

    The call state upon call termination. please refer this link: Can we fire an event when ever there is Incoming and Outgoing call in iphone?


    Starting iOS 10, you should use CXCall.