New iOS 14 StoreKit deprecate using as SKStoreReviewController.requestReview() Ok I create method to request feedback for iOS 14
func rateApp() {
var ud = UserDefaults.standard.integer(forKey: "rew")
NSLog("rew show count is %d", ud)
if(ud >= 1)
{
if #available(iOS 14.0, *) {
if let scene = UIApplication.shared.connectedScenes.first as? UIWindowScene {
SKStoreReviewController.requestReview(in: scene)
NSLog("rateappios14")
}
} else {
// Fallback on earlier versions
SKStoreReviewController.requestReview()
NSLog("rateappotherios")
}
}
ud = ud + 1
UserDefaults.standard.setValue(ud, forKey: "rew")
UserDefaults.standard.synchronize()
}
I tested it on device deployed from Xcode, and on simulator all is fine. But then I upload to App Store and download it, then review request not working completely. Also not works in TestFlight.