Skip to content

iOS + CallKit: intermittent process kill during first LocalParticipant microphone publish after room connect #976

@youcefhedibel

Description

@youcefhedibel

Describe the bug
When integrating LiveKit with CallKit on iOS, the app intermittently gets killed during the first local microphone publish after room connection.
The issue appears during early call startup when audio is activated by CallKit and the SDK begins publishing the local audio track.

SDK Version
LiveKit Swift SDK 2.13.0

iOS/macOS Version
iOS 26.2.1 (observed on device model iPhone13,2)

Xcode Version
Xcode: 26.3
Swift version: 6.2

Steps to Reproduce

  1. Start an outgoing audio call using CallKit-integrated flow.
  2. Let CallKit activate audio session (didActivate).
  3. Connect to LiveKit room.
  4. Trigger first local mic publish (auto or initial explicit mic enable).
  5. Observe intermittent app termination around LocalParticipant._publish(...).

Expected behavior
The first microphone publish should either succeed or fail with a recoverable error callback.
The app process should not be terminated.

Screenshots
N/A (log-based issue; no stable UI crash screen).

Logs

XChatCallManager [CallKit]: didActivate audioSession
XChatCallManager [CallKit]: audioSession configured for playAndRecord/voiceChat
XChatLiveKitMediaSession: engine availability set to default for CallKit
Room.connect(url:token:connectOptions:roomOptions:) Connecting to room...
XChatLiveKitMediaSession: auto-publishing tracks (mic=true camera=false)
XChatLiveKitMediaSession: mic sync start target=true firstPublishState=idle
XChatLiveKitMediaSession: firstMicPublishState=preparing
XChatLiveKitMediaSession: firstMicPublishState=publishing
LocalParticipant._publish(track:options:) [publish] LocalAudioTrack(sid: nil, name: microphone, source: microphone) options: nil...
Message from debugger: killed

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions