XIII
XIII

Reputation: 2044

iOS local notifications disabled automatically if app isn't opened

As I see in many apps when setting user notifications as reminders, it works fine but after a while when the user starts to ignore opening the notification or the app it won't send any more notifications. Is there a way to disable this behavior and continue sending the notifications even if they don't open the app?

Upvotes: 0

Views: 231

Answers (1)

Fogmeister
Fogmeister

Reputation: 77661

What you are describing sounds like local notifications. These are scheduled in code to go off at a specific time. As far as I know there is no such thing as a recurring local notification. They are "simulated" by creating many single local notifications to begin with.

Edit As PaulW pointed out. Recurring notifications are possible but are rarely used due to their limitations.

When the app is opened it runs some code to create some more local notifications.

If the app is not opened then the code never runs to create the additional notifications.

So, in this example, it is not iOS stopping the recurring notifications because you haven't opened the app. The notifications stop recurring because you don't open the app and give it the opportunity to create more of them.

So, to answer your question. No. The only way to delay this as long as possible is to create notifications that cover a long time into the future. But then I believe there is a limit to the number of scheduled notifications. (A quick google comes up with a limit of 64 scheduled notifications per app).

Edit you could also use repeating notifications but they are limited to repeat every one unit of time. Once a day, once and hour, once a minute, etc... so you can't do it every two hours.

Alternatively you could use a backend to send remote notifications. These could theoretically recur infinitely because the app is not required to create them. Of course, this assumes you have the infrastructure setup to develop this.

Upvotes: 1

Related Questions