LiveCommunicationKit: In‑call banner missing in foreground, only appears after app goes background (iPhone14 Pro)

Environment:

  • Device: iPhone 14 Pro
  • iOS version: 26
  • SDK: LiveCommunicationKit
  • App status: Foreground / Active state
  • Problem reproduction: Intermittent, happens on some devices, not 100% reproducible on all test devices.

Expected behavior: Incoming call banner should present when app is active (foreground).

Actual behavior: No system incoming‑call banner while app is foreground. Banner appears only after pressing home‑button / switching app to background.

Additional notes: Our app uses LiveCommunicationKit because VoIP PushKit is not permitted for China mainland App Store distribution. Call reporting completes without error; no error returned from LiveCommunicationKit API.

    private func _lckReportIncomingCall(call: Call?, uuid: UUID, handle: String, hasVideo: Bool, displayName: String) {
        guard let manager = conversationManager else {
            Log.error("[ProviderDelegate-LCK] ConversationManager is nil, falling back")
            _fallbackReportIncomingCall(call: call, uuid: uuid, handle: handle, hasVideo: hasVideo, displayName: displayName)
            return
        }
        
        let callInfo = callInfos[uuid]
        let callId = callInfo?.callId ?? ""
        
        let remoteHandle = Handle(type: .generic, value: handle, displayName: displayName)
        let update = Conversation.Update(localMember: nil, members: [remoteHandle], activeRemoteMembers: [remoteHandle])
        
        // 冷启动时 iOS PKPushRegistry 要求在 2 秒内上报来电,否则杀进程。
        // Task { @MainActor } 是异步的,调试时主线程 RunLoop 来不及调度就超时了。
        // 这里用 DispatchSemaphore 在后台线程同步等待 LCK 上报完成。
        let semaphore = DispatchSemaphore(value: 0)
        var lckError: Error?
        
        DispatchQueue.main.async {
            Task { @MainActor in
                do {
                    try await manager.reportNewIncomingConversation(uuid: uuid, update: update)
                    Log.info("[ProviderDelegate-LCK] Reported incoming conversation: callId=\(callId), uuid=\(uuid)")
                    
                    if TelecomManager.shared.endCallkit {
                        CoreContext.shared.doOnCoreQueue(synchronous: true) { core in
                            let linphoneCall = core.getCallByCallid(callId: callId)
                            if linphoneCall?.state == .PushIncomingReceived {
                                try? linphoneCall?.terminate()
                            }
                        }
                    }
                } catch {
                    Log.error("[ProviderDelegate-LCK] Failed to report incoming conversation: \(error)")
                    lckError = error
                }
                semaphore.signal()
            }
        }
        
        let waitResult = semaphore.wait(timeout: .now() + 5)
        if waitResult == .timedOut {
            Log.error("[ProviderDelegate-LCK] Timed out waiting for LCK report, falling back")
            _fallbackReportIncomingCall(call: call, uuid: uuid, handle: handle, hasVideo: hasVideo, displayName: displayName)
        } else if let error = lckError {
            Log.error("[ProviderDelegate-LCK] LCK report failed: \(error), declining SIP call")
            // 来电被拒(勿扰/黑名单等),decline 掉 SIP 侧
            CoreContext.shared.doOnCoreQueue(synchronous: true) { _ in
                try? call?.decline(reason: .Busy)
            }
        }
    }

Answered by DTS Engineer in 904683022

Expected behavior: Incoming call banner should present when app is active (foreground).

By design, neither CallKit nor LiveCommunicationKit present UI while the app is in the foreground.

I'd typically suggest filing a bug asking us to change the behavior; however, in this case, there's no point doing so as the entire reason we DON'T present the call UI... is because that’s what developers asked us to do by filing bugs.

More specifically, when CallKit was introduced in iOS 10, it did present the standard call UI and time a call was reported, even if the app was in the foreground. This generated immediate complaints from developers who wanted to be able to manage the call experience themselves, so the behavior was changed to what it does currently.

__
Kevin Elliott
DTS Engineer, CoreOS/Hardware

Accepted Answer

Expected behavior: Incoming call banner should present when app is active (foreground).

By design, neither CallKit nor LiveCommunicationKit present UI while the app is in the foreground.

I'd typically suggest filing a bug asking us to change the behavior; however, in this case, there's no point doing so as the entire reason we DON'T present the call UI... is because that’s what developers asked us to do by filing bugs.

More specifically, when CallKit was introduced in iOS 10, it did present the standard call UI and time a call was reported, even if the app was in the foreground. This generated immediate complaints from developers who wanted to be able to manage the call experience themselves, so the behavior was changed to what it does currently.

__
Kevin Elliott
DTS Engineer, CoreOS/Hardware

Seeing the opposite on iOS 27.3. With our app active and in front, reportNewIncomingConversation shows the system's incoming call banner on top of our own ringing screen. Happens every time on an iPhone 18 Pro Max and an iPad Pro, both 27.3.

The device log shows the system knows the app is in front and picks the banner anyway:

callservicesd Received state update for ... running-active-Visible
InCallService shouldPresentDismissedForCall: callStatus:4 ... callProviderWantsDismissed:NO
InCallService preferredPresentationMode = banner

We only report while in front because reporting at answer time sometimes made the iPad switch to the full-screen call UI. Is the banner expected now, and is there a supported way to avoid it? I found a private flag that does this (shouldSuppressInCallUI), but I can't use a private API in an App Store app.

https://developer.apple.com/documentation/callkit/voip-calling-with-callkit

Seeing the opposite on iOS 27.3. With our app active and in front, reportNewIncomingConversation shows the system's incoming call banner on top of our own ringing screen. Happens every time on an iPhone 18 Pro Max and an iPad Pro, both 27.3.

Is it happening in Speakerbox? If it's not happening in Speakerbox, then it's a bug in your app that you need to fix.

Note: I'm aware that you're using LiveCommunicationKit, but that doesn't really matter here. LiveCommunicationKit is effectively a "wrapper" written on top of CallKit, so the kind of issue you're describing couldn't happen in one and not the other.

That leads to here:

We only report while in front because reporting at answer time...

What do you mean by this? Do you mean that you're trying to only use CallKit while your app is in the background?

If so, then all I can really suggest is that you stop doing that. All call activity needs to go through CallKit or LCK. See this forum thread for the details of "why" you need to use CallKit for all call audio.

__
Kevin Elliott
DTS Engineer, CoreOS/Hardware

It reproduces in Speakerbox on both devices. I built MakingAndReceivingVoIPCallsWithCallKit.zip unmodified except setting our development team and raising the deployment target to 16.0 (Xcode rejects 13.0 for the Intents extension), then used its "Incoming Call" button (5-second delay) with Speakerbox in front:

  • iPhone 18 Pro Max, iOS 27.3 (24C5049f): the incoming call appears at the top with Decline and Answer over Speakerbox (runningForeground).
  • iPad Pro 11-inch (4th generation), iPadOS 27.3: a banner with "Speakerbox Audio", the caller, and Decline and Answer appears over Speakerbox.

An iPhone sysdiagnose right after a Speakerbox ring at 18:18:52 shows:

18:18:57.526 callservicesd Received add incoming call request from call source <CXXPCCallSource ... identifier=com.example.apple-samplecode.callkit-speakerbox-sample isConnected=1 ... isPermittedToUsePublicAPI=1 isPermittedToUsePrivateAPI=0>
18:18:57.631 InCallService shouldPresentDismissedForCall: callStatus:4, isExpanseMessages:0, isConversation:0, isOutgoing:0, isAudioCall:1, wantsStagingArea:0 avLessWantsDismissed:0 callProviderWantsDismissed:NO isOutgoingIpadFTA:0 tappedPill:NO screeningWantsDismissed:NO
18:18:57.631 InCallService performPresentationWithConfiguration: preferredPresentationMode = dismissed; preferredBannerHeight = 104.00; supportsSystemAperture = YES;
18:18:57.631 InCallService Requested a new scene with presentationMode=dismissed userInitiated=0
18:18:57.726 InCallService HUDActivityManager - updateSystemApertureElement type:incomingThirdPartyVoIPCall

On iPhone, InCallService dismisses the in-call scene as designed, but the Dynamic Island still shows the incoming call with Decline and Answer over the foreground app. The earlier preferredPresentationMode = banner line came from the iPad, which has no Dynamic Island.

To clarify, we do not skip LiveCommunicationKit in the foreground. We report every incoming call with reportNewIncomingConversation when it starts ringing, including in front, and run all call audio in the audio session activated by conversationManager(_:didActivate:). I meant reporting at ring time instead of answer time. Earlier, only while in front (PushKit's mustReport was false), we tried ringing in our own UI and reporting at Answer, then joining about 20 ms later. On iPad that sometimes switched to the full-screen call UI, so we returned to reporting at ring time.

I filed FB25698574 with the sysdiagnose and screenshots.

Is there a supported way for a foreground app with its own ringing UI to keep the system's incoming-call UI (the Dynamic Island element on iPhone, the banner on iPad) from showing, or is this expected behavior on iOS 27?