我正在为非消耗性产品提供恢复功能。当我点击恢复时,它会提示登录警报,我使用现有的 Apple Id 进行登录,在输入用户 ID 和密码后,点击确定,然后再次提示登录警报。
为什么输入用户信息后又提示?
编辑:恢复过程代码:
-(void)RestorePurchasedItems
{
[[SKPaymentQueue defaultQueue] addTransactionObserver:self];
[[SKPaymentQueue defaultQueue] restoreCompletedTransactions];
}
- (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions
{
NSLog(@"=======%@",transactions);
}
- (void)paymentQueue:(SKPaymentQueue *)queue restoreCompletedTransactionsFailedWithError:(NSError *)error
{
if (error.code == SKErrorPaymentCancelled) {
}
}
- (void)paymentQueueRestoreCompletedTransactionsFinished:(SKPaymentQueue *)queue
{
NSMutableArray* purchasableObjects = [[[NSMutableArray alloc] init] autorelease];
for (SKPaymentTransaction *transaction in queue.transactions)
{
NSString *productID = transaction.payment.productIdentifier;
[purchasableObjects addObject:productID];
}
self.OnSuccessRestored(purchasableObjects); //Block Call to access the products
}