The requestReview() method of SKStoreReviewController is deprecated in iOS 14 beta. There is a new requestReview(in windowScene: UIWindowScene), but with the App structure in SwiftUI, there is no UIWindowScene. How to request app review?
Request review in SwiftUI
Have you figured this out yet? Looking for an answer myself.
Code Block import StoreKit if let windowScene = UIApplication.shared.windows.first?.windowScene { SKStoreReviewController.requestReview(in: windowScene) }
This might be useful for iOS 15+:
// try getting current scene
guard let currentScene = UIApplication.shared.connectedScenes.first as? UIWindowScene else {
print("UNABLE TO GET CURRENT SCENE")
return
}
// show review dialog
SKStoreReviewController.requestReview(in: currentScene)
This might be useful for iOS 15+:
// try getting current scene
guard let currentScene = UIApplication.shared.connectedScenes.first as? UIWindowScene else {
print("UNABLE TO GET CURRENT SCENE")
return
}
// show review dialog
SKStoreReviewController.requestReview(in: currentScene)