Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
aks3800 opened this issue Apr 30, 2021 · 4 comments

Comments

@aks3800
Copy link

aks3800 commented Apr 30, 2021

FlutterDownloaderPlugin.setPluginRegistrantCallback(registerPlugins) in AppDelegate is giving me error A C function pointer can only be formed from a reference to a 'func' or a literal closure when I updated to Xcode 12.5

This got solved by using the below snippet instead of FlutterDownloaderPlugin.setPluginRegistrantCallback(registerPlugins)

FlutterDownloaderPlugin.setPluginRegistrantCallback({ registry in if (!registry.hasPlugin("FlutterDownloaderPlugin")) { FlutterDownloaderPlugin.register(with: registry.registrar(forPlugin: "FlutterDownloaderPlugin")!) } })

@KevinSu1991
Copy link

nice

@nehal076
Copy link

nehal076 commented Mar 9, 2022

Any solution to this issue yet?

@bartekpacia
Copy link
Collaborator

See #286. It's resolved.

@tongwanming
Copy link

nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants