iOS: A default alert will be showed after purchasing a product in-app purchase

Viewed 289

I am struggling with a problem that after purchasing a product successfully and a system alert ("You're all set, Your purchase was successful") will be showed as well. The problem is that I am not able to get a callback or any event to know the system alert was dismissed in order to display a custom popup

func paymentQueue(_ queue: SKPaymentQueue, updatedTransactions transactions: [SKPaymentTransaction]) {
    for transaction:AnyObject in transactions {
        if let trans = transaction as? SKPaymentTransaction {
            switch trans.transactionState {
            case .purchased:
                // the default alert will be showed after purchasing a product successfully
                break
            case .failed:
                break
            case .restored:
                break
            default:
                break
        }
    }
}                         

Note that: the system has prompted won't get a callback

enter image description here

I wanna show the below photo after users tapped the "Ok" button from the default alert. I am not able to get a callback or any event to know the default alert was dismissed in order to display my custom popup

Thank you so much for helping me

0 Answers
Related