iOS Development

swift – Utilizing flutter Webview app, seems black display screen at ios

Spread the love


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

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

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

  if #out there(iOS 13.0, *){
      UNUserNotificationCenter.present().delegate = self as? UNUserNotificationCenterDelegate
  }

  let authOptions: UNAuthorizationOptions = [.alert, .badge, .sound]
  UNUserNotificationCenter.present().requestAuthorization(
      choices: authOptions,
      completionHandler: { _, _ in }
  )

  software.registerForRemoteNotifications()
  Messaging.messaging().delegate = self
  GeneratedPluginRegistrant.register(with: self)
  //return tremendous.software(software, didFinishLaunchingWithOptions: launchOptions)
  return true

}
func software(software: UIApplication,
didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Knowledge) {
Messaging.messaging().apnsToken = deviceToken
}

override func software(_ software: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, choices: UIScene.ConnectionOptions) -> UISceneConfiguration {
return UISceneConfiguration(identify: “Default Configuration”, sessionRole: connectingSceneSession.position)
}

override func software(_ software: 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 ?? ""]
    NotificationCenter.default.put up(
        identify: Notification.Identify("FCMToken"),
        object: nil,
        userInfo: dataDict
    )
}

}
`

I made a android app with flutter webview.
In android gadget, it really works efficiently, however in ios atmosphere it simply exhibits me black display screen.
Are there some fallacious strains?

I anticipate app to point out me regular display screen…
That is first time making app, so I haven’t got sufficient expertise..

2 thoughts on “swift – Utilizing flutter Webview app, seems black display screen at ios

  1. Fantastic blog here, too. Your website loads really quickly. What web host are you using? Could you provide me with your affiliate link? I wish my page loaded as soon as yours does.

Leave a Reply

Your email address will not be published. Required fields are marked *