This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import AuthenticationServices | |
class Awesome: ASWebAuthenticationPresentationContextProviding { | |
// ERROR: Cannot declare conformance to 'NSObjectProtocol' in Swift | |
... | |
} | |
import Foundation | |
import AuthenticationServices | |
class Awesome: NSObject, ASWebAuthenticationPresentationContextProviding { | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private var window: UIWindow { | |
guard | |
let scene = UIApplication.shared.connectedScenes.first, | |
let windowSceneDelegate = scene.delegate as? UIWindowSceneDelegate, | |
let window = windowSceneDelegate.window as? UIWindow | |
else { | |
return UIWindow() | |
} | |
return window |