import StoreKit import UIKit // MARK: - REVIEW ENGINE class ReviewEngine { static func logScan() { let count = UserDefaults.standard.integer(forKey: "scanCount") + 1 UserDefaults.standard.set(count, forKey: "scanCount") if count == 20 || count == 100 { DispatchQueue.main.asyncAfter(deadline: .now() + 2.0) { if let scene = UIApplication.shared.connectedScenes.first as? UIWindowScene { SKStoreReviewController.requestReview(in: scene) } } } } }