Next, let's embed our images. First, return to the RestaurantDetailViewController.swift file and, in the showNotification() method we created, remove the following code:
let trigger = UNTimeIntervalNotificationTrigger(timeInterval: 5, repeats: false)let identifier = "letsEatReservation"let request = UNNotificationRequest(identifier: identifier, content: content, trigger: trigger)UNUserNotificationCenter.current().add(request, withCompletionHandler: { error in // handle error})
Replace the deleted section of code with the following code:
guard let imgURL = Bundle.main.url(forResource: "sample-restaurant-img@3x", withExtension:"png") else { return }let attachment = try! UNNotificationAttachment(identifier