We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9531e3d commit 393ec87Copy full SHA for 393ec87
ios/FreeraspReactNative.swift
@@ -77,14 +77,16 @@ class FreeraspReactNative: RCTEventEmitter {
77
78
private func getProtectedWindow(completion: @escaping (UIWindow?) -> Void) {
79
DispatchQueue.main.async {
80
- if let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene {
81
- if let window = windowScene.windows.first {
82
- completion(window)
+ if #available(iOS 13.0, *) {
+ if let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene {
+ if let window = windowScene.windows.first {
83
+ completion(window)
84
+ } else {
85
+ completion(nil)
86
+ }
87
} else {
88
completion(nil)
89
}
- } else {
- completion(nil)
90
91
92
0 commit comments