1

I am working on music app and it has feature of switching between playing/not playing music when app minimized. How can I do it?

I use that code to enable playing in backgound, but how can I disable it?

    do {
        try AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayback)
        try AVAudioSession.sharedInstance().setActive(true)
    } catch let error as NSError {
        print(error.localizedDescription)
    }
dsfs
  • 189
  • 1
  • 3
  • 10
  • you can check this topic, it seems to me it is related to yours http://stackoverflow.com/questions/10429204/how-to-handle-background-audio-playing-while-ios-device-is-locked-or-on-another – Jim Carol Apr 07 '17 at 14:44

0 Answers0