 //
 
 import UIKit
+import UserNotifications
 
 @UIApplicationMain
 class AppDelegate: UIResponder, UIApplicationDelegate {


    func weatherUpdated() {
        // Received notification of data update
        group?.leave()
    }
}

        // Listen for weather updates for background fetch
        NotificationCenter.default.addObserver(self, selector: #selector(weatherUpdated), name: .weatherNotification, object: nil)
        
        // Add local notification handling to notify user of new data
        // TODO: Add onboarding view.
        let center = UNUserNotificationCenter.current()
        let options: UNAuthorizationOptions = [.alert, .sound];
        center.requestAuthorization(options: options) {
            (granted, error) in
            if !granted {
                print("Something went wrong")
            }
        }
        return true
    }

