 
         let center = UNUserNotificationCenter.current()
         center.requestAuthorization(options: [.alert, .sound], completionHandler: { (granted, error) in })
+        center.delegate = self // userNotificationCenter が呼ばれるようにするため
         createNotification()
     }
 

        content.sound = UNNotificationSound.default()

        request = UNNotificationRequest(identifier: "normal", content: content, trigger: trigger)
    }

    override func didReceiveMemoryWarning() {

import UIKit
import UserNotifications

class StoreViewController: UIViewController, UNUserNotificationCenterDelegate {
    var timer: Timer!
    var request: UNNotificationRequest!

