d7laungani / DLLocalNotifications

:speech_balloon: Easily create Local Notifications in swift - Wrapper of UserNotifications Framework
MIT License
214 stars 38 forks source link

Help me! Support required #25

Closed nagarajavrao closed 4 years ago

nagarajavrao commented 5 years ago

I have 3 local notifications need to be repeated daily from (9am to 6pm with frequency of 3 hrs), I used repeatsFromToDate() but it didn't work.

Note:- There are 3 LocalNotification with the different startTime& endTime & user can stop/start any of these at anytime.

I need to repeat it 3-4 times a day till the user turns off the notification (ie., 10AM, 1PM, 4PM, 7PM today, tomorrow... ) - this is for notification1, similarly the app has 2 similar notifications (Notification2 might trigger at 9AM, 12PM, 3PM, 6PM today, tomorrow... Notification3- 4PM, 10PM today, tomorrow...). How to repeat them daily between these time intervals? Again user can't change the frequency, he could change the start & end time for each notifications or turn off.

d7laungani commented 4 years ago

I was not able to reproduce your issue but I created a test to show how you would get your desired functionality

https://github.com/d7laungani/DLLocalNotifications/blob/4b2c3a20c8d38a889a920ad0e1f6e9cf57d80a9e/DLLocalNotificationsTests/DLLocalNotificationsTests.swift#L183