Skip to content

Latest commit

 

History

History
35 lines (26 loc) · 1.78 KB

README.md

File metadata and controls

35 lines (26 loc) · 1.78 KB

ios12-airpods-routing-bugreport

Test app for displaying/verifying issue with AirPods not allowing routing overrides

Summary:

System will force the route back to AirPods if the application attempts use overrideOutputAudioPort(_:)

Sample app can be found here

Steps to Reproduce:

  1. Pair AirPods to device, and place in ears so device registers AirPods as connected.
  • Audio route will automatically switch to AirPods
  1. Open Application
  2. Setup AVAudioSession according to the configuration below
  3. Configure a NotificationCenter observer to listen and report changes on AVAudioSession.routeChangeNotification
  4. Activate the audio session by passing true to setActive(_:)
  5. Pass AVAudioSession.PortOverride.speaker to overrideOutputAudioPort(_:) in order to initiate an audio route override
  6. Observer the changes fired from your route change listener from step 4

Expected Results:

App audio should be routed to the speakers instead of the AirPods.

Actual Results:

AVAudioSessionRouteChangeNotification will report route changed due to AVAudioSessionRouteChangeReasonOverride, but then immediate after will switch back to AirPods with the reason AVAudioSessionRouteChangeReasonNewDeviceAvailable.

NOTE: At no point were the AirPods moved or removed.

Version/Build:

  • Able to reproduce building with Xcode 10.0 (10A255) using an iPhone 8+ running iOS 12.0.1 (16A404).
  • Working as expected building with Xcode 10.0 (10A255) using an iPhone 7 running iOS 11.4.1 (15G77)

Configuration:

  • AVAudioSession category: AVAudioSessionCategoryPlayAndRecord
  • AVAudioSession mode: AVAudioSessionModeVoiceChat
  • AVAudioSession category options mode: AVAudioSessionCategoryOptionAllowBluetooth