I’m engaged on the flutter_downloader iOS configuration and I’ve no data of swift. I get an error however I do not know methods to clear up it. Please recommend how can I format my code so it begins working correctly. Under is my code of AppDelegate.swift:
import UIKit
import Flutter
import FirebaseCore
import Firebase
import flutter_downloader
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate, MessagingDelegate {
override func utility(
_ utility: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
FirebaseApp.configure()
GeneratedPluginRegistrant.register(with: self)
FlutterDownloaderPlugin.setPluginRegistrantCallback(registerPlugins)
Messaging.messaging().delegate = self
if #out there(iOS 10.0, *) {
// For iOS 10 show notification (despatched through APNS)
UNUserNotificationCenter.present().delegate = self as? UNUserNotificationCenterDelegate
let authOptions: UNAuthorizationOptions = [.alert, .badge, .sound]
UNUserNotificationCenter.present().requestAuthorization(
choices: authOptions,
completionHandler: {_, _ in })
}
utility.registerForRemoteNotifications()
return tremendous.utility(utility, didFinishLaunchingWithOptions: launchOptions)
}
non-public func registerPlugins(registry: FlutterPluginRegistry) {
if (!registry.hasPlugin("FlutterDownloaderPlugin")) {
FlutterDownloaderPlugin.register(with: registry.registrar(forPlugin: "FlutterDownloaderPlugin")!)
}
}}