I was able to get this to work. In applicationWillTerminate(_)
you can schedule a notification as long as you do it synchronously. If your normal scheduling using async functions you may need to create a separate function or do it inline. Just make sure you do it as quickly as possible so the time limit doesn't run out. Also, you need to schedule a second or two in the future, as it will not fire with the current date because the time is passed by the time it gets scheduled.