I just want to schedule a same local notification in Swift. For example I just want to schedule a message saying "It's time to calculate your bill for this month" and I want to send this same message again next month.
How to do this kind of local notification in Swift?
I have referenced followings but was not able to schedule a same message in next month ...
//http://thecodeninja.tumblr.com/post/89942124085/notifications-in-ios-8-part-1-using-swift-what-is //From String to NSDate in Swift
UILocalNotification
has a repeatInterval
property that lets you specify how often the notification should repeat. Note that this is an NSCalendarUnit
, not just an arbitrary number, so you can only make a notification repeat once per calendar unit (second, minute, hour, day, week, month, etc.). See the NSCalendarUnit
documentation for more options.
For example, you can make a notification repeat every month with:
notification.repeatInterval = .CalendarUnitMonth
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With