0

I had a local notification and I set repeatInterval like this

notification.repeatInterval = kCFCalendarUnitWeek;

but now kCFCalendarUnitWeek is deprecated.

What can I use instead of this constant.

Thanks a lot..

LoGoCSE
  • 558
  • 5
  • 13

1 Answers1

1

Use NSCalendarUnitWeekOfYear with the repeatInterval of your UILocalNotification. If you had used the NSWeekCalendarUnit, it would have informed you to use either NSCalendarUnitWeekOfYear or NSCalendarUnitWeekOfMonth, and in this case you want to use the former.

See https://stackoverflow.com/a/25555560/1271826.

Community
  • 1
  • 1
Rob
  • 415,655
  • 72
  • 787
  • 1,044