Detect incoming phone calls

后端 未结 3 582
悲&欢浪女
悲&欢浪女 2021-01-06 21:16

I need to determine when an incoming phone call arrives. I know that applicationWillTerminate will be called if the user takes the call and applicationWillResignActive when

3条回答
  •  长情又很酷
    2021-01-06 21:50

    I know this questions is really old, but in case someone else reach this question just like me, there is an audio session delegate to detect if the audio will be interrupted (mainly by a Phone call).

    For any app playing audio this approach works for detecting incoming iphone calls.

    Here is a link to Apple documentation for: Handling Audio Interruptions

提交回复
热议问题