Неверная метка аргумента в вызове (имеет «with:», ожидается «withRegistry:») – flutter_local_notifications iOSIOS

Программируем под IOS
Anonymous
Неверная метка аргумента в вызове (имеет «with:», ожидается «withRegistry:») – flutter_local_notifications iOS

Сообщение Anonymous »


Hi I do a flutter app which uses flutter_local_notifications library,

I am going alongside with guide (https://pub.dev/packages/flutter_local_ ... -ios-setup) to setup IOS notifications

the quide even links to a example code on GitHub https://github.com/MaikuB/flutter_local ... gate.swift

but I got error in AppDelegate file

Incorrect argument label in call (have 'with:', expected 'withRegistry:')


Изображение


idk what to do, did anyone have that problem?

replacing "with" by "withRegistry" does not resolve the problem because then I got error in other way

Incorrect argument label in call (have 'withRegistry:', expected '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

Вернуться в «IOS»