Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- content.title = "Changement de semaine"
- content.body = "Nous sommes en semaine (notificationSemaineAB())"
- content.sound = UNNotificationSound.default
- var dateComponent = DateComponents()
- dateComponent.weekday = 2
- dateComponent.hour = 11
- let trigger = UNCalendarNotificationTrigger(dateMatching: dateComponent, repeats: true)
- let request = UNNotificationRequest(identifier: "semaineAB", content: content, trigger: trigger)
- UNUserNotificationCenter.current().add(request)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement