Creating notification contents

Notifications typically consist of a few pieces of content. First of all, every notification has a title, a subtitle, and a message body. Not all fields have to be present, but you'll often want to provide a bit more information than just a piece of body text. You can also add media attachments to notifications. These attachments are used to provide a preview of a photo, video, or audio file that is stored locally on the device, and are great for providing better-looking, richer notifications to your user.

The biggest gap between local and remote notifications exists in the way you create them. Push notifications are always created on the server and are pushed to the device in a JSON format. Local notifications are created on the device using the UNNotification class. Let's look at each notification type separately.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.71.142