SwiftUI: how to send local notifications

Photo by Angelo Burgener on Unsplash

This post shows you how to send local notifications.

What’s in a local notification?

The local notification includes two main parts:

  • Content: the content of a notification. It includes title, body, user info, etc.
  • Trigger: when to send a notification. It can be time, calendar, and location…