问题描述:

I'm building an app where an user has a meal plan defined for the week. This meal plan has a list of meals per day (up to 12 meals) and a notification should fire when it's that meal's time. The problem is: in the worst case, an user could have up to 84 different meals in a week and it's not possible to schedule so many notifications. It's possible that during the whole week the user doesn't open the app, so I'd rather not have the logic of scheduling new notifications on app launch.

What I thought about doing was running a method at a certain hour everyday to schedule notifications for the following day, but I've found that performing these tasks in the background has quite a few restrictions in iOS. What is the recommended way of doing something like this?

相关阅读:
Top