Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/118.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios IAP:接收`paymentQueueRestoreCompletedTransactionsFinished:`带有未完成事务的回调_Ios_In App Purchase_Storekit - Fatal编程技术网

Ios IAP:接收`paymentQueueRestoreCompletedTransactionsFinished:`带有未完成事务的回调

Ios IAP:接收`paymentQueueRestoreCompletedTransactionsFinished:`带有未完成事务的回调,ios,in-app-purchase,storekit,Ios,In App Purchase,Storekit,有时我会收到这样的回电 - (void)paymentQueueRestoreCompletedTransactionsFinished:(SKPaymentQueue *)queue 甚至在我收到这个之前 - (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions 我甚至不能说finishTransaction:。我觉得这太奇怪了。我一直假设paymentQueueRest

有时我会收到这样的回电

- (void)paymentQueueRestoreCompletedTransactionsFinished:(SKPaymentQueue *)queue
甚至在我收到这个之前

- (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions
我甚至不能说finishTransaction:。我觉得这太奇怪了。我一直假设paymentQueueRestoreCompletedTransactionsFinished:在我将每个未完成的事务标记为已完成之前不会触发

这是预期的行为吗

这是我在文档中找到的

-voidpaymentQueueRestoreCompletedTransactionsFinished:SKPaymentQueue *队列描述 通知观察者付款队列已完成发送还原的交易。此方法在之后调用 支付队列已处理所有可恢复的交易。 应用程序不需要在此方法中执行任何操作


我不确定这是什么意思。

我发现头文件本身在这方面最清楚

@interface SKPaymentQueue : NSObject
...
// Array of unfinished SKPaymentTransactions.  Only valid while the queue has observers.  Updated asynchronously.
@property(nonatomic, readonly) NSArray *transactions;

@end

@protocol SKPaymentTransactionObserver
// Sent when all transactions from the user's purchase history have successfully been added back to the queue.
- (void)paymentQueueRestoreCompletedTransactionsFinished:(SKPaymentQueue *)queue
...
@end
这两个因素结合在一起,使之明确无误。 一旦StoreKit将所有事务添加到SKPaymentQueue,就会触发PaymentQueue RestoreCompletedTransactionsFinished-[SKPaymentQueue transactions]只有未完成事务的列表

我想医生们应该更清楚这一点