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
- Start an outgoing audio call using CallKit-integrated flow.
- Let CallKit activate audio session (
didActivate).
- Connect to LiveKit room.
- Trigger first local mic publish (auto or initial explicit mic enable).
- 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
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.0iOS/macOS Version
iOS
26.2.1(observed on device modeliPhone13,2)Xcode Version
Xcode: 26.3
Swift version: 6.2
Steps to Reproduce
didActivate).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