Open lulupointu opened 2 years ago
Hi, have you found any answers to your questions ? I feel like I can't really use other plugins too
Hi, unfortunately not. I spent a lot of time digging into this problem and this issue was the last call for help (which went on unanswered as you can see 😉)
Sorry to hear that, thanks for the update :)
The issue
I'm developing a plugin which uses a native SDK to operate. The issue is that when adding my plugin and
background_locator
to an app, the native SDK of my plugin can no longer communicate with my dart code.After investigating, is seems that the problematic part is the swift code you ask to add during initialization:
The issue is that this code calls
registerWithRegistar
on my plugin, with the registrar you are giving (which is a FlutterEngine). It appears that channels created with this registrar are broken (I managed to reproduce the issue with thequick_actions
plugin as well).Question 1:
Can you explain the reason why do you recommend adding this code when using the background_locator plugin? Especially since, it seems like any other call to
registerWithRegistrar
occurring after the 1st one is ignored according to the following code:Question 2:
In the documentation "Use other plugins in callback" you recommend using the following code for other plugins:
Is there a reason the setup of background_locator and the setup of additional plugin is different ? The first makes us register a second time ALL plugins, while the second only registers background_locator. Should we replace the setup section with the following :