Home > AI > IOS > StoreKit >

IOS Rate

import StoreKit

Button {
    if #available(iOS 14.0, *) {
        if let scene = UIApplication.shared.connectedScenes.first(where: { $0.activationState == .foregroundActive }) as? UIWindowScene {
                                SKStoreReviewController.requestReview(in: scene)
                            }
                        } else {
                            SKStoreReviewController.requestReview()
                        }
                        
                    } label: {
                        Text("")
                            .padding()
                            .frame(width: home.defaultPadding*3)
}

Leave a Reply