title: Swift Repeat LocalNotification every 5 days
body: <p>How to repeat LocalNotification every 5 days at 10:00 AM</p>
  
  <p>I try this, but it's not working</p>
  
  <pre><code>let content = UNMutableNotificationContent()
  content.title = "Hello!"
  content.body = "Hello_message_body"
  content.sound = UNNotificationSound.default()
  
  let futureTime = Date().addingTimeInterval(5 * 24 * 60 * 60)
  var calendar = NSCalendar.current
  calendar.timeZone = NSTimeZone.system
  var components = calendar.dateComponents([.hour, .minute, .second], from: futureTime)
  components.hour = 10
  components.minute = 0
  components.second = 0
  
  let trigger = UNCalendarNotificationTrigger(dateMatching: components, repeats: true)
  let request = UNNotificationRequest(identifier: "FiveDays", content: content, trigger: trigger)
  let center = UNUserNotificationCenter.current()
  center.add(request)
  </code></pre>