Reputation: 3
I'm currently looking for a way to give the User of my App to set a time window where he will receive notifications. UILocalNotification doesn't offer such setting. I was thinking about a having "silent" notifications that trigger a new time cycle? So for example the User wants to see repeating notifications only between 8am & 8pm how would you do that?
PS: The notification itself works great but im struggling with the time window.
Upvotes: 0
Views: 273
Reputation: 164
When you set notification fire time, just make a check if current time is more than 8am and less than 8pm. Else, if notification fire time is not inside this interval, change fire time to next day. Simple as that.
Upvotes: 0
Reputation: 50089
the IOS settings app allows users to configure a DND time interval -- thats globally though
if you that for your app only schedule notifications during that time... there is no app specific DND setting
Upvotes: 1