Alternative to deprecated AudioSessionGetProperty, for iOS 7

后端 未结 2 788
栀梦
栀梦 2020-12-30 03:36

I am using AudioSessionGetProperty to check \'audioIsAlreadyPlaying\'. Xcode says: \'AudioSessionGetProperty\' is deprecated: first deprecated in iOS 7.0

P

相关标签:
2条回答
  • 2020-12-30 04:10

    Trying using the AVAudioSession's otherAudioPlaying property on iOS 6.0 or higher.

    [[AVAudioSession sharedInstance] isOtherAudioPlaying]

    0 讨论(0)
  • 2020-12-30 04:11

    The AVAudioSession class replaces deprecated AudioSession APIs. For what you're doing, see the otherAudioPlaying property.

    0 讨论(0)
提交回复
热议问题