Turn off in-app purchases?

We currently have a live app that contains episodic content in the app store.

We are processing our prices, and instead of offering individual episodes for purchase, we want it to be just a series of episodes.

My question is this: if I found that my old identifiers are NOT deleted for sale, can a user who previously purchased this content still allow access to it? (Meaning, if I ask if they purchased it, whether it will return true)

I'm new to buying apps in apps, and I'm not quite sure how this works.

Also, if I remove the identifier from iTunesConnect, what happens? Should this be done?

Thanks in advance for your understanding.

+6
source share
1 answer

When using [[SKPaymentQueue defaultQueue] restoreCompletedTransactions]; Apple will return all completed transactions to SKPaymentQueue , which is a collection of transactions. The transaction will contain a payment object. The payment object will contain the productIdentifier . This information is available despite being deleted. Thus, you can honor past purchases that are no longer needed for the purchase.

Here is a sample code:

 [[SKPaymentQueue defaultQueue] restoreCompletedTransactions]; #pragma mark SKPayment Observer Delegate methods - (void) paymentQueueRestoreCompletedTransactionsFinished:(SKPaymentQueue *)queue { NSLog(@"received restored transactions: %i", queue.transactions.count); for (SKPaymentTransaction *transaction in queue.transactions) { NSLog(@"tran for product: %@ of state: %i", [[transaction payment] productIdentifier], [transaction transactionState]); switch ([transaction transactionState]) { case SKPaymentTransactionStateRestored: NSLog(@"found restored transaction: %@ productIdentifier: %@", transaction.transactionIdentifier, transaction.payment.productIdentifier); [self yourRestoreProcessSelector:transaction]; break; default: break; } } } 
+3
source

Source: https://habr.com/ru/post/888958/


All Articles