IOS app only plays sounds through headphones

The iPhone that I use for development outputs the sound through the headphones for all the applications that I run from xcode. Other applications (for example, Youtube or iTunes) perfectly reproduce sound, and also build and test the same applications on another device (iPad). Running applications in the simulator also works as intended.

I use:

  • Xcode 6 (works in Swift 1.2)
  • AVFoundation library and AVAudioPlayer
  • iPhone 6 Plus (with iOS 8.4.1)
  • the phone is not in silent mode

Any tips or hints would be appreciated. Thanks

+4
source share
1 answer

.

AVAudioSessionRouteChangeNotification

. HandlingAudioHardwareRouteChanges

-.

, , , . AVAudioSessionRouteChangeReason

+1

Source: https://habr.com/ru/post/1607095/


All Articles