1

is there a way to specify which days should an UILocalNotification fire? I want to be able to set different days, lets say: fire a local notification only on mondays, tuesdays and sundays. Is there a way to do that? Huge thanks! Update: Maybe I can set multiple local notifications for each of the days and give each of them a repeatInterval of NSWeekCaldnerUnit. Is this a correct approach?

cpprulez
  • 896
  • 2
  • 9
  • 21

2 Answers2

2

You should use three different local notification then.

For a list of available repeatIntervals see here.

KingofBliss
  • 15,055
  • 6
  • 50
  • 72
1

Yes You can do it manually by using this method.. dateByAddingTimeInterval().Just enter some time like 24*60*60 to that method which is fired after a day.Try it with some cases you want.

SURESH SANKE
  • 1,653
  • 17
  • 34
  • are you creating date and pass it to "dateComponents " or what ? – Salma Feb 17 '19 at 11:22
  • Yes exactly. 24*60*60 this is the duration of the time when the notification should be fired. I have mentioned above format for 24 hours from currect time. – SURESH SANKE Mar 19 '19 at 11:44