Replace deprecated .windows with .connectedScenes (#316)

This commit is contained in:
Davide De Rosa 2023-06-17 21:40:09 +02:00 committed by GitHub
parent fb47def4ed
commit ddab76326d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -81,7 +81,7 @@ public final class Reviewer: ObservableObject {
// may or may not appear
private func requestReview() {
guard let scene = UIApplication.shared.windows.first(where: { $0.windowScene != nil })?.windowScene else {
guard let scene = UIApplication.shared.connectedScenes.first(where: { $0 is UIWindowScene }) as? UIWindowScene else {
return
}
SKStoreReviewController.requestReview(in: scene)