iOS Authentication works in 0.4.0, but not in 0.4.1 - AQUIRE_ROOT_VIEW_CONTROLLER_FAILED
I have an example app which authenticates with multiple identity providers, including Auth0 and Okta. Using 0.4.0, both buttons work on Android and iOS, but using 0.4.1, one button always results in an AQUIRE_ROOT_VIEW_CONTROLLER_FAILED error on iOS. For now, I will use 0.4.0, but I'm concerned I won't be able to update in the future.
As I understand it, the change was to support Flutter apps with "add to app" use cases, but I think this may have broken for "pure" Flutter apps. I'm having trouble debugging the plugin, but I wonder if it should check for UIApplication.shared.delegate?.window??.rootViewController as? FlutterViewController first, and then check for UIApplication.shared.keyWindow?.rootViewController.
This is indeed unfortunate and should be fixed!
As I understand it, the change was to support Flutter apps with "add to app" use cases, but I think this may have broken for "pure" Flutter apps. I'm having trouble debugging the plugin, but I wonder if it should check for
UIApplication.shared.delegate?.window??.rootViewController as? FlutterViewControllerfirst, and then check forUIApplication.shared.keyWindow?.rootViewController.
Did you try to make this change? Did it fix the problem? Would you be able to submit a PR with the change?
I was able to test this change in my Flutter application, so I submitted a PR, but I did not test the other use case.