title: Swift fixing array for notifications
body: <p>I'm trying to fix my notifications displaying every day what should I pack up for school for next day.</p>
  
  <p>Everything seems ok, but <code>content.subtitle</code> shows error :</p>
  
  <blockquote>
    <p>Thread 1: EXC_BREAKPOINT (code=1, subcode=0x1007dbb00) </p>
  </blockquote>
  
  <p>Is there problem with array also? I searched for answer, but it looks like nobody used array for notification body. Is it even possible?
  And if it's not can I replace it with better replacement?
  Thanks for any help.</p>
  
  <pre><code>let plan = [
      ["dzien": "Sunday", "lekcje": nil],
      ["dzien": "Saturday", "lekcje":["pon1","pon2","pon3"]],
      ["dzien": "Tuesday", "lekcje":["wt1","wt2","wt3"]],
      ["dzien": "Wednesday", "lekcje":["sr1","sr2","sr3"]],
      ["dzien": "Thursday", "lekcje":["cz1","cz2","cz3"]],
      ["dzien": "Friday", "lekcje":["pt1","pt2","pt3"]],
      ["dzien": "Saturday", "lekcje": nil],
  ]
  
  func getDayOfWeek() -&gt; Int {
      let myCalendar = Calendar(identifier: .gregorian)
      let weekDay = myCalendar.component(.weekday, from: Date())
      return weekDay - 1
  }
  
      @objc func registerLocal() {
      let center = UNUserNotificationCenter.current()
  
      center.requestAuthorization(options: [.alert, .badge, .sound]) { (granted, error) in
          if granted {
              print("Sukces")
          } else {
              print("Nie dzieła")
          }
      }
  }
  
      @objc func scheduleLocal() {
          let center = UNUserNotificationCenter.current()
  
          let content = UNMutableNotificationContent()
  
          let d = getDayOfWeek()%6
          let dzis = plan[d]
          if dzis["lekcje"] != nil {
  
          content.title = "Pack up"
          content.subtitle = dzis["dzien"]
          var lekcje = ""
          for lekcja in dzis["lekcje"] {
              lekcje+="\(lekcja)\n"
          }
          content.body = lekcje
          content.userInfo = ["customData": "fizzbuzz"]
          } else {
  
          content.title = "Tommorow \(dzis["dzien"]), You don't have any subjects."
          }
  
          var dateComponents = DateComponents()
          dateComponents.hour = 16
          dateComponents.minute = 00
          let trigger = UNCalendarNotificationTrigger(dateMatching: dateComponents, repeats: true)
  
          let request = UNNotificationRequest(identifier: UUID().uuidString, content: content, trigger: trigger)
          center.add(request)
  
              }
  }
  </code></pre>