Skip to content

Speaker Button State Not Persisting with CallKit Integration #678

@tc-fborges

Description

@tc-fborges

Issue Summary

When using Twilio Video SDK with CallKit integration in iOS VoIP applications, the speaker button visual state does not persist correctly when users interact with the native CallKit interface. Audio routing continues to work correctly (audio is routed through speaker), but the UI state becomes desynchronized, showing speaker as "off" when it's actually "on".

Environment Details

  • Twilio Video SDK Version: 5.9.0
  • iOS Version: iOS 17.0+ (tested on multiple versions)
  • Xcode Version: 16.4
  • Device Type: iPhone 13
  • Language: Swift
  • Integration: CallKit + Twilio Video SDK

Problem Description

During an active VoIP call using Twilio Video SDK with CallKit integration:

  1. User starts a VoIP call (audio)
  2. User switches to the native Phone app interface (CallKit UI)
  3. User taps the speaker button in the native interface
  4. Expected: Audio routes to speaker AND speaker button remains visually selected
  5. Actual: Audio routes to speaker correctly BUT speaker button visual state reverts to unselected

Reproduction Steps

  1. Create a VoIP app using Twilio Video SDK with CallKit integration
  2. Start a VoIP call (audio)
  3. Switch to the native Phone app interface (swipe up or use CallKit UI)
  4. Tap the speaker button in the native interface
  5. Observe that:
    • Audio correctly routes to speaker
    • Speaker button visual state briefly shows as selected
    • Speaker button visual state reverts to unselected after ~0.5-1 seconds

Technical Details

I reviewed the sample application and applied the necessary modifications to enforce to route audio output through the speaker. Despite these changes, the issue seems to be also present in the sample app.

You can find the sample code that was implemented to test here in my fork:

tc-fborges#1

Sample Video

Grabacion.de.pantalla.2025-07-18.a.la.s.11.37.20.a.m.mov

Additional Context

This issue affects all VoIP applications using Twilio Video SDK with CallKit integration. The workarounds are complex and don't provide a complete solution.


Reporter: Fernando Borges
Date: July, 18th. 2025

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions