Привет, я создаю приложение Flutter, которое использует библиотеку flutter_local_notifications.
Я использую руководство (https://pub.dev/packages/flutter_local_ ... -ios-setup), чтобы настройка уведомлений IOS
В руководстве даже есть ссылка на пример кода на GitHub https://github.com/MaikuB/flutter_local ... ppDelegate. Swift
но я получил ошибку в файле AppDelegate
Неверная метка аргумента в вызове (имеется 'with:', ожидается 'withRegistry:' )

не знаю, что делать, была ли у кого-нибудь такая проблема?
замена «with» на «withRegistry» не решает проблему потому что тогда я получил ошибку по-другому.
Неверная метка аргумента в вызове (имеется «withRegistry:», ожидается «with:»)
Код: Выделить всё
import UIKit
import Flutter
import Firebase
import flutter_local_notifications
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
FirebaseApp.configure()
FlutterLocalNotificationsPlugin.setPluginRegistrantCallback { (registry) in
GeneratedPluginRegistrant.register(with: registry)
}
if #available(iOS 10.0, *) {
UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate
}
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}
Источник: https://stackoverflow.com/questions/772 ... istry-flut
Мобильная версия