import UIKit
import Flutter
import FirebaseMessaging
import FirebaseCore
import Firebase
import flutter_local_notifications

@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {

  FlutterLocalNotificationsPlugin.setPluginRegistrantCallback {(registry) in
      //GeneratedPluginRegistrant.register(with: registry)

  if #available(iOS 13.0, *){
      UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate

  let authOptions: UNAuthorizationOptions = [.alert, .badge, .sound]
      options: authOptions,
      completionHandler: { _, _ in }

  Messaging.messaging().delegate = self
  GeneratedPluginRegistrant.register(with: self)
  //return super.application(application, didFinishLaunchingWithOptions: launchOptions)
  return true

func application(application: UIApplication,
didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
Messaging.messaging().apnsToken = deviceToken

override func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
return UISceneConfiguration(name: “Default Configuration”, sessionRole: connectingSceneSession.role)

override func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) {


extension AppDelegate: MessagingDelegate{
func messaging(_ messaging: Messaging, didReceiveRegistrationToken fcmToken: String?){
let token = String(describing: fcmToken)
print(“Firebase registration token: (token)”)

    let dataDict: [String: String] = ["token": fcmToken ?? ""]
        name: Notification.Name("FCMToken"),
        object: nil,
        userInfo: dataDict


I made a android app with flutter webview.
In android device, it works successfully, but in ios environment it just shows me black screen.
Are there some wrong lines?

I expect app to show me normal screen…
This is first time making app, so I don’t have enough experience..