An extension that does this:
"With local notifications, your app configures the notification details locally and passes those details to the system, which then handles the delivery of the notification when your app is not in the foreground. Local notifications are supported on iOS, tvOS, and watchOS." (apple developer page)
This feature is very crucial for idle games which are quite popular now.