0

I am using following code to trigger repeat alarm with end date.

let components = calendar.dateComponents([.month,.day,.hour,.minute], from: date, to: TODate)

After this code I have used notification for trigger. But this code is not working for triggering notifications.

But following code (only from date) works perfectly.

let components = calendar.dateComponents(in: .current, from: date).

How can I schedule a repeat alarm with end date?

halfer
  • 19,824
  • 17
  • 99
  • 186
Gunaseelan
  • 14,415
  • 11
  • 80
  • 128
  • check out this thread: https://stackoverflow.com/questions/37938771/uilocalnotification-is-deprecated-in-ios10 – eNeF Feb 01 '18 at 13:17
  • @nferocious76 Hi, I need to schedule with from date and to date, is it possible? – Gunaseelan Feb 01 '18 at 13:24
  • have you tried creating 2 components with current date and 'to date' and load it? I haven't really dig deeper to this API so I can't give you an exact answer but some hints. – eNeF Feb 02 '18 at 06:40

0 Answers0