Overview
- I have an iOS app which sends local notifications at specific dates.
- I just learned that I can only schedule 64 notifications at a given time.
- There are cases when I can’t schedule notifications as the 64 slots are filled.
- So I store them in the database and when the user responds to a notification I check if there are any available slots and schedule the remaining notifications.
Problem
- When the user doesn’t respond to a notification my code is not executed so I am not able to schedule the remaining notifications.
Question
- Is there a solution for this problem ?
- can I execute a piece of code (house keeping) at certain times ?
- is there any work around for this ?
You may not want to signal to the user there is a problem, but rather just do it in the background. If a user has 64 notifications for one app and hasn’t opened the app, then they probably aren’t using the app. Once a notification has fired it isn’t in the array anymore. So you will have room every time a notification is fired off. They do however remain in notification centre, which you have to clear out yourself.
Its usually better to not present possible problems to the user, but rather handle them in a way that makes sense internally if that is an option. Look up the delegate methods for the appDelegate and you will most likely find ways you can handle what you are trying to do.
Thought I would make a post in case you wanted to accept the answer.
Best of luck.