 import FirebaseInstanceID
 import FirebaseMessaging
 
-
 @UIApplicationMain
 class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterDelegate, MessagingDelegate {
     

        print("messaging: didRefreshRegistrationToken fcmToken: \(fcmToken)")
    }
    
    
    /// This method is called on iOS 10 devices to handle data messages received via FCM through its
    /// direct channel (not via APNS). For iOS 9 and below, the FCM data message is delivered via the
    /// UIApplicationDelegate's -application:didReceiveRemoteNotification: method.
//    @available(iOS 10.0, *)
//    public func messaging(_ messaging: Messaging, didReceive remoteMessage: MessagingRemoteMessage) {
//        print(remoteMessage.appData)
//    }
    
    
    /// The callback to handle data message received via FCM for devices running iOS 10 or above
//    @available(*, deprecated, message: "Use FIRMessagingDelegate’s -messaging:didReceiveMessage:")
//    public func application(received remoteMessage: MessagingRemoteMessage) {
//        print(remoteMessage.appData)
//    }
    
//    func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any]) {
//        let dict = userInfo["aps"] as! NSDictionary
//        let message = dict["alert"]
//        print("message: \(String(describing: message))")
//    }
    
    ////////////////
    
    // Called when APNs has assigned the device a unique token
    func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
        // Convert token to string
        let deviceTokenString = deviceToken.reduce("", {$0 + String(format: "%02X", $1)})
        
        // Print it to console
        print("APNs device token: \(deviceTokenString)")
        
        // Persist it in your backend in case it's new
        
        Messaging.messaging().apnsToken = deviceToken
    }

    func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool {
        return FBSDKApplicationDelegate.sharedInstance().application(application, open: url, sourceApplication: sourceApplication, annotation: annotation)
    }
    
    func setNavBarAppearance() {
        // Set color of app's navigation bars
