Dev-hwang / flutter_foreground_task

This plugin is used to implement a foreground service on the Android platform.
https://pub.dev/packages/flutter_foreground_task
MIT License
149 stars 109 forks source link

A C function pointer can only be formed from a reference to a 'func' or a literal closure #278

Closed giandifra closed 1 month ago

giandifra commented 1 month ago

Hello, I've this error on AppDelegate.swift:

Screenshot 2024-09-23 alle 12 41 39

Dev-hwang commented 1 month ago

@giandifra

hello, try this

SwiftFlutterForegroundTaskPlugin.setPluginRegistrantCallback { registry in
   GeneratedPluginRegistrant.register(with: registry)
}
if #available(iOS 10.0, *) {
   UNUserNotificationCenter.current().delegate = self
}
giandifra commented 1 month ago

It's working, thanks!