flutter_web_auth_2
flutter_web_auth_2 copied to clipboard
iOS: Add SceneDelegate handling to fix ACQUIRE_ROOT_VIEW_CONTROLLER_FAILED
This is a follow-up from https://github.com/LinusU/flutter_web_auth/pull/145.
I encountered this error again, and, after some research, I found that "As of iOS 13, UIApplication.shared.delegate?.window has been deprecated. Instead, you should use the SceneDelegate to get the root view controller. If you're targeting iOS 13 and later, you should update your code to handle this.". This attempts to address that (still testing)
This did not work yet 🙁
Feel free to experiment a bit - I will merge this when it's working!
Closing for now due to being stale - feel free to reopen this or open another PR when ready!
I finally came back to this, and both the before and after worked for me. I think the issue had to do with Flutter versions.