2

I am using callkit and Pushkit in my App. after using callkit when my app going in background a red view show in top of the screen even i have disconnected the call.

How to Remove this top View programmatically.

here is screenshot of issue. enter image description here

i am disconnecting phone call. using this link

CallKit Call Dissconnect

  • 1
    This is an iOS limitation. I think it's a privacy thing. Apple wants the users to know that they're in a phone call wherever they are. Same for apps who are monitoring location in the background, or recording audio. – TawaNicolas Jul 26 '17 at 08:03
  • 1
    This is not an issue. This default behavior of iOS. – Arasuvel Jul 26 '17 at 08:04
  • @ TawaNicolas .. when i am not in any phone call .. this top view is showing evry time when minimize the App. – Varinder Singh iPhone Dev Jul 26 '17 at 08:07

4 Answers4

5

If you are using CallKit framework, that bar should be green. Red is often used to indicate a SIP call without CallKit framework implementation. But if you say that call is ended and bar is still there, that means you haven't ended a call properly using CallKit. Which means it still indicates an active SIP call.

You can get UUID of a call when you reportNewIncomingCallWithUUID and when you reporting outgoing call with [[CXStartCallAction alloc] initWithCallUUID. In that method you create and pass your UUID.

NSUUID *callUUID = [NSUUID UUID];

You have to keep track of it!

3

This is not an issue. It's default behavior of iOS.

You can see the similar behavior when you are in a Phone call, monitoring location in the background, recording audio, Video call(eg: Skype).

Arasuvel
  • 2,971
  • 1
  • 25
  • 40
0

Your audio session still a recoding Session (like play and record audio session) that's why the red bar still on top. That indicate to the user that your app is recording audio like it was mentioned in previous comments (normal iOS behaviour). If you want to remove the red bar after a call is ended, switch you audio session to a non recoding one like the ambient audio session.

momo
  • 54
  • 7
0

Red banner means AVAudioSession is still active. Use CallKit's provider method to deactivate your audio engine

func provider(_ provider: CXProvider, didDeactivate audioSession: AVAudioSession)
Miki
  • 903
  • 7
  • 26