Scheduling notifications with your notification controller
In this section, we will look at how we can set up and schedule notifications using the UIApplication
and UILocalNotification
classes to send notification messages once an order is successfully processed so that it can then be displayed within the dynamic notification controller class. Here are the steps:
Open the
AppDelegate.swift
file located within the ShoppingList group in the project navigation window.Next, locate the
didFinishLaunchingWithOptions
method and enter the following highlighted code snippet:func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { // Override point for customization after application launch. let notificationCategory:UIMutableUserNotificationCategory = UIMutableUserNotificationCategory() // Initialize our Notification Category notificationCategory.identifier = "ORDER_PLACED" // Register our Notification...