## Content

UNNotificationContent provides read-only access to information shown to the user about a specific notification. For setting information (e.g. when preparing to send a local notification), you’d use the UNMutableNotificationContent class.

## Triggers

As of iOS 12, there are four kinds of notification: Calendar, Time, Location, and Push. The first 3 are used with local notifications, while the last is only used for push notifications.

• Calendar triggers for a specific date: “Today at 7 pm”, or “every day at 8 am”.
• Time triggers in a set time from now: In 30 seconds, or every 30 seconds.
• Location1 triggers when the user either exits or enters a specific region. You can set to send the notification for both entry and exit.
• Push is used to detect whether the notification you received is a push notification or not.

Local Notifications are notifications generated entirely on the device. These would be things that appear when you enter or leave an area, at a certain time, etc.

The way to send a local notification is to create a UNNotificationRequest, with an identifier, content, and a trigger, then ask the current UNUserNotificationCenter to add(_:withCompletionHandler:) the request.

This script is a simple curl-based script for sending test notifications. It requires modifications for your specific key and such, and you should change the \$curl variable to us what you got from running brew install curl-openssl.