What is wrong with my code ?

I am fairly new to Xcode and swift. I am trying to send a notification from firebase to my app . Thanks Again

import Firebase

import FirebaseMessaging

import UserNotifications

import UIKit

@main

class AppDelegate: UIResponder, UIApplicationDelegate, MessagingDelegate, UNUserNotificationCenterDelegate {

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

    

    

    Messaging.messaging().delegate = self

    UNUserNotificationCenter.current().delegate = self

    

    UNUserNotificationCenter.current().requestAuthorization(options:[.alert, .sound, .badge]) {success, _ in guard success else {

                  return

            }

    

    print("Success in APNS registry")

    

        }

    application.registerForRemoteNotifications()

    

    

        return true

    }

    

    func messaging(_ messaging: Messaging, didReceiveRegistrationToken fcmToken: String?) {

        messaging.token {token, _ in

            guard let token = token else {

                return

            }

        print("Token: (token)")

            

            

        }

    }

}

What is the expected result of your code? What is the actual result you get? For which platform is your app? Can you show your code properly formatted? Is your question really relevant to wwdc21-10002?

Friendly Hint: paste your code (using "Paste and Match Style") into a code-block, then it will look nice, and people will be able to read it.

What is wrong with my code ?
 
 
Q