I have the next code:
var notification = UILocalNotification()
notification.alertBody = "Message" // text that will be displayed in the notification
notification.fireDate = NSDate() // right now (when notification will be fired)
notification.soundName = UILocalNotificationDefaultSoundName // play default sound
let calendar = NSCalendar.currentCalendar()
let components = calendar.components([.Minute], fromDate: NSDate())
notification.repeatInterval = NSCalendarUnit.CalendarUnitHour // this line defines the interval at which the notification will be repeated
UIApplication.sharedApplication().scheduleLocalNotification(notification)
but it's deprecated. Searched a lot, but couldn't convert it to Swift2. Can anyone help me with the line:
notification.repeatInterval = NSCalendarUnit.CalendarUnitHour