# Local Notification

**URL:** <https://forums.kodeco.com/t/local-notification/176417>\
**Category:** UIKit Apprentice\
**Created:** [August 8, 2022, 10:46am UTC](https://forums.kodeco.com/t/local-notification/176417 "2022-08-08T10:46:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nileshjdarji](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/nileshjdarji/32/102075_2.png) [@nileshjdarji](https://forums.kodeco.com/u/nileshjdarji)\
**Post date:** [August 8, 2022, 10:46am UTC](https://forums.kodeco.com/t/local-notification/176417/1 "2022-08-08T10:46:25Z")

</div>

In Checklist App in local notifications section we added this let center = UNUserNotificationCenter.current() at two places: In AppDelegate and in the ChecklistItem object. Why?

---

<div class="post-metadata">

**Author:** ![fahim](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/fahim/32/110943_2.png) [@fahim](https://forums.kodeco.com/u/fahim)\
**Post date:** [August 8, 2022, 11:16am UTC](https://forums.kodeco.com/t/local-notification/176417/2 "2022-08-08T11:16:35Z")

</div>

You use `UNUserNotificationCenter.current()` to get a reference to the notification center. Then you can execute notification center methods on the instance you have a reference to.

In AppDelegate, after you get the reference, you have the line `center.delegate = self` which sets the AppDelegate as the delegate for receiving any notification center related events.

In ChecklistItem, you use the notification center reference to schedule notifications and to remove pending notifications.

Not sure why you think you shouldn’t have called it in two places though? The reason it was called in several places is to get a reference to the notification center at points where we need to perform actions affecting the notification center.

Does that clarify things? 🙂
