Thank you ! Look forward to digging into this!
Post
Replies
Boosts
Views
Activity
Oh this one was a doozy - hopefully is someone comes looking for an answer you learn from my problem. Apparently, it is possible for the audio NOT to play when silent mode is engaged (on the iPhone with the switch, on iPad through control center). That said, I need to add some code in order for the audio to play WHILE IN SILENT MODE:
//Here is the code you need up until player.play to enable it to play while in silent mode: do {
try AVAudioSession.sharedInstance().setCategory(AVAudioSession.Category.playback)
} catch {
// report for an error
}
player.play()