Transaction comes back after finishTransaction: has been called on it

后端 未结 10 1157
一个人的身影
一个人的身影 2020-12-08 15:06

I am using in-app purchase for an iPhone app. I have a class that acts as SKProductsRequestDelegate and SKPaymentTransactionObserver, and it\'s all

10条回答
  •  一个人的身影
    2020-12-08 15:49

    I was having the EXACT same issue.

    Based on the answers, I did some experiments and found that if I hold a reference to the Queue, the problem went away.

    For example:

    // myStoreManagerClass.h
    ...
    SKPaymentQueue *_myQueue;
    ...

    //myStoreManagerClass.m
    ...
    if(_myQueue == nil) {
    _myQueue = [[SKPaymentQueue defaultQueue];
    }
    ...

    I then made sure that all my methods used my instance variable reference. Since doing that, the issue has cleared up.

提交回复
热议问题