0

I am trying to send a local notification when the AVAudioSession route changes. There is an NSNotification called routeChangeNotification. I was able to set that up to send a notification but it only works if the app is in the foreground. How can I set up routeChangeNotifcation to send a local notification to the user even when the app is in the background when it is called? I looked into scheduling notifications and I found calendar based/ time based but how do I set up routeChangeNotifcation to be the trigger?

  • I saw an answer that iOS 7 it wasn’t possible unless you have something playing in the background. Anything new for iOS 12 or 13? – Malek Amiri Aug 15 '19 at 22:22
  • https://stackoverflow.com/questions/21246853/ios-avaudiosession-route-change-notification-in-background – Malek Amiri Aug 15 '19 at 22:24

0 Answers0