Hi jbaileyUnfortunately this didn't work, it seems to only be called when the watch is inactive for awhile or if a diferent app is brought to the front. Any other suggestions?Andrew
Post
Replies
Boosts
Views
Activity
Hi jlilest002I tried your suggestion and another line of code :- AVAudioSession.RouteSharingPolicy.longFormAudio but unfortunately it didn't work. I am not very experienced in programming so maybe I am inserting this code in the wrong place, it's just before the code to define the audio path and "try AVAudioPlayer(contentsOf: urlPath)" let session = AVAudioSession.sharedInstance()
// AVAudioSession.RouteSharingPolicy.longFormAudio
do {
// try AVAudioSession.session.RouteSharingPolicy.longFormAudio
try session.setCategory(AVAudioSession.Category.playback,
mode: .default,
policy: .longFormAudio,
options: [])
} catch let error {
fatalError("*** Unable to set up the audio session: \(error.localizedDescription) ***")
}Andrew