I am trying to figure out whether I can accomplish my goal through Local Notifications, or whether I need to switch to Remote Notifications.
I'm practicing iOS 10 / Swift 3 by building an alarm program that plays the latest episode of a RSS-updated radio show at a set time of day. When the app is in the foreground, this is easy to execute through UNUserNotificationCenterDelegate's willPresent function. I just use willPresent to fetch the latest episode, and play it through an AVAudio Player.
Of course, if the app only works in the foreground, this functionality is very limited. I would want the app to work the same way when in the background or closed.
I can see from the documentation that willPresent does not run when the app isn't in the foreground. Is there another way to have Local Notifications execute code prior to pushing the notification when the app is in the background? Or will I have to switch to Remote Notifications? I see this answer to a related question but I'm wondering if there's a more elegant approach.