Have you looked at the UserNotifications framework? UILocalNotification has been deprecated in favour of it and, more importantly, it has a much nicer API for repeated notifications.
I’m not 100% sure why your current code is failing, but I have some things that you should fix:
In C-based languages numbers starting with zero are interpreted at octal. So,
010is not 10, it’s 8. Thus, it’s best to avoid leading zeroes (not that they’ve causing problems in this specific case).
You have a time zone mixup. Your date component code is using
+localTimeZonebut your local notification code is using
For that matter, there’s no need to set a time zone in the date components. The date components are interpreted by the calendar, and the calendar defaults to local time.
Share and Enjoy
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"