Open JordyLangen opened 2 years ago
Thanks for raising this issue. Unfortunately I'm having trouble visualising both approaches so would it be possible to have a draft PR for each one?
Hi @MaikuB
As for the drafts:
Let me know what you think
Thanks for that @JordyLangen . Should preface this by saying I don't have much experience working on macOS so bear with me as my questions could be stupid :)
Anyway, I've been doing some researching, looking at what you have and got the following questions
uni_links_desktop
. However, the way I interpreted your original message was that the issue happens when multiple plugins call NSAppleEventManager.shared().setEventHandler
. I didn't see this code at all with that plugin. I'm wondering if the issue lies elsewhereuni_links_desktop
plugin could also be the one that could have the fix done rather than this pluginUIApplicationDelegate
calls
We've run into the issue that we have multiple plugins that depend on setting an event handler through
NSAppleEventManager.shared().setEventHandler
, the next one always overwriting the previous one.In our case it's the uni_links_desktop plugin that handles every deeplink as it registers after the flutter app_auth plugin. To solve this, we've come up with two solutions:
FlutterAppAuth
static instance is exposed, so we can do something like this:processCallback(url)
which we can call afteruni_links
gave us the callback url on the flutter side. (I understand this solution solves our problem, not necessarily everyones problem who might run into the same issue). I've made a quick proof of concept and this would work.Let me know what you think, we'd be happy to help out and create the PR if needed.