Following in app purchase, app crashing on startup. productIdentifier=nil?

后端 未结 5 1526
天命终不由人
天命终不由人 2020-12-05 14:09

I have a few users who have reported that after attempting an in app purchase the app is now crashing on startup. I have asked them to delete and reinstall the app which has

5条回答
  •  被撕碎了的回忆
    2020-12-05 14:59

    I've run into a similar issue when the transaction is in the SKPaymentTransactionStateRestored. My testing has indicated this might be an issue with IOS 7.0.3, but I have not been able to verify this.

    StoreKit keeps a persistent list of transactions that your application must finish. As you've noted the transaction will be reported on every startup until it is finished.

    The solution that we implemented is to check if the product identifier is nil before usage from the entry point:

    - (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions
    

    Even when we received a transaction with a nil product identifier we were able to successfully call finishTransaction.

    I hope this helps.

提交回复
热议问题