Getting a Notification on the same item a second time

I have put up notifications (Capter 19 IOS Apprentice) on an item wit a Month, day out several days. Te first notification comes back fine. I should get a notification on the next days at the same time until the date of the record is less than the current date but i do not receive any further notifications beyond the first one. I am running the app on my iPhone and I am not turning the power off and I am not bringing up the app after the first notification. Can you please tell me what I am doing wrong?? Thanks

Chapter 19 is about UI improvements, do you mean Chapter 20 rather than 19? :slight_smile:

If yes, how did you set up notifications for every day? Without knowing how you went about things, it’s a little difficult to tell you how (or why) things went wrong since the book only covers setting up a notification for a given day, if I’m not mistaken.

However, if I’m to make a guess, if you set up all your notifications at the same time and you use the same identifier, you probably are modifying the notification you create first for each subsequent notification you set up. Note the following from the UNNotificationRequest documentation:

A unique identifier for the request (if identifier is not unique, a new notification request object is not created). You can use this identifier later to cancel a request that is still pending. This parameter must not be nil.

To do what you are attempting to do, you would need to create multiple notifications with different unique identifiers, or wait for the first notification to fire and then set up the second and then when the second fires, set up the third and so on.

Thanks fahim, It is Chapter 20, sorry. Thank you also for your quick response. I am running the supplied code from Chapter 20 on my iPhone. I appreciate your suggestion. I thought by setting a date, eg. 5 days out, the reminders would come for the 5 days before that. Obviously, I am not a heavy coder.
I need to study the code harder.
Thanks again.

This topic was automatically closed after 166 days. New replies are no longer allowed.