File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -404,6 +404,18 @@ - (void)dismissWithoutAnimation:(SFSafariViewController *)controller
404404#pragma clang diagnostic ignored "-Wpartial-availability"
405405- (UIWindow *)presentationAnchorForWebAuthenticationSession : (ASWebAuthenticationSession *)session API_AVAILABLE(ios(13.0 ))
406406{
407+ if (@available (iOS 15.0 , *)) {
408+ for (UIScene *scene in UIApplication.sharedApplication .connectedScenes ) {
409+ if ([scene isKindOfClass: [UIWindowScene class ]] && scene.activationState == UISceneActivationStateForegroundActive) {
410+ UIWindowScene *windowScene = (UIWindowScene *)scene
411+ for (UIWindow *window in windowScene.windows ) {
412+ if (window.isKeyWindow ) {
413+ return window;
414+ }
415+ }
416+ }
417+ }
418+ }
407419 return UIApplication.sharedApplication .keyWindow ;
408420}
409421#pragma clang diagnostic pop
You can’t perform that action at this time.
0 commit comments