I am working on a local notification for an app that should only fire on a specific day and repeat on that day until the user decided to remove it. An example notification is on that fires every Wednesday at 11:00am.
The function - scheduleLocalNotification is triggered when the user presses done on the Time picker.
var sundayNotification : UILocalNotification! var mondayNotification : UILocalNotification! var tuesdayNotification : UILocalNotification! var wednesdayNotification : UILocalNotification! var thursdayNotification : UILocalNotification! var fridayNotification : UILocalNotification! var saturdayNotification : UILocalNotification! func scheduleLocalNotification() { //Check the Dayname and match fireDate if dayName == "Sunday" { sundayNotification = UILocalNotification() //timeSelected comes from the timePicker i.e. timeSelected = timePicker.date sundayNotification.fireDate = fixNotificationDate(timeSelected) sundayNotification.alertTitle = "Sunday's Workout" sundayNotification.alertBody = "This is the message from Sunday's workout" sundayNotification.alertAction = "Snooze" sundayNotification.category = "workoutReminderID" let appDelegate = UIApplication.sharedApplication().delegate as! AppDelegate appDelegate.saveContext() UIApplication.sharedApplication().scheduleLocalNotification(sundayNotification) } else if dayName == "Monday" { mondayNotification = UILocalNotification() mondayNotification.fireDate = fixNotificationDate(timeSelected) mondayNotification.alertTitle = "Monday's Workout" mondayNotification.alertBody = "This is the message from Monday's workout" mondayNotification.alertAction = "Snooze" mondayNotification.category = "workoutReminderID" let appDelegate = UIApplication.sharedApplication().delegate as! AppDelegate appDelegate.saveContext() UIApplication.sharedApplication().scheduleLocalNotification(mondayNotification) } else if ..... } } func fixNotificationDate(dateToFix: NSDate) -> NSDate { let dateComponets: NSDateComponents = NSCalendar.currentCalendar().components([NSCalendarUnit.Hour, NSCalendarUnit.Minute], fromDate: dateToFix) dateComponets.second = 0 if dayName == "Sunday" { dateComponets.weekday = 1 //n = 7 } else if dayName == "Monday" { dateComponets.weekday = 2 } else if dayName == "Tuesday" { dateComponets.weekday = 3 } else if dayName == "Wednesday" { dateComponets.weekday = 4 } else if dayName == "Thursday" { dateComponets.weekday = 5 } else if dayName == "Friday" { dateComponets.weekday = 6 } else if dayName == "Saturday" { dateComponets.weekday = 7 } let fixedDate: NSDate! = NSCalendar.currentCalendar().dateFromComponents(dateComponets) return fixedDate } After doing a check of the day to assign the notification the right UILocalNotification, this still strangely does not work e.g. setting different times on a different days (Sunday at 10:10am and Monday at 10:15am) for the notification does not change anything. The notification still fires on a day I did not select, i.e. Today at both those times instead of those days.
Any clues on what I could be doing wrong or missing? Thanks in advance. :)

