flutter_web_auth_2 icon indicating copy to clipboard operation
flutter_web_auth_2 copied to clipboard

iOS: Add SceneDelegate handling to fix ACQUIRE_ROOT_VIEW_CONTROLLER_FAILED

Open Will5 opened this issue 1 year ago • 2 comments

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)

Will5 avatar Sep 09 '24 21:09 Will5

This did not work yet 🙁

Will5 avatar Sep 09 '24 22:09 Will5

Feel free to experiment a bit - I will merge this when it's working!

ThexXTURBOXx avatar Sep 10 '24 06:09 ThexXTURBOXx

Closing for now due to being stale - feel free to reopen this or open another PR when ready!

ThexXTURBOXx avatar Nov 28 '24 10:11 ThexXTURBOXx

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.

Will5 avatar Sep 13 '25 00:09 Will5