Search code examples
iosobjective-cswiftlocalnotification

Ios repeating local notifications


Here are my problems :

  1. Schedule local notifications between two dates every specific day of the week . example : between march 1 and march 20 every sunday

  2. I have more than 64 local notifications to set which is the limit .

    For the first problem i know there is repeatIntervals which i can set to fire notification every Sunday but how can i set them between two dates ? Do i need to calculate manually and find all the Sundays between March 1 and 20 and then set it or there is something better ?


Solution

  • Use the NSCalendar to get the specific dates, put in an array, and pass to the scheduleLocalNotification.

    In this topic you can have a sample code of how to do it.