I have managed to restore in-app transactions and get the transaction identifier from the original transaction, but how do I identify the product which were bought in the transaction? Is it possible to get the product identifier for a previously purchased in-app product?
A: A product identifier is a string used to uniquely identify every product you wish to sell from your application. The App Store uses it to retrieve information about a product. It is a string identifier that can only contain alphanumeric (A-Z, a-z, 0-9), underscore (_), and period (.) characters.
Restoring purchases prevents you from losing all the things that have been purchased on the old devices. All you need to do is sign in with your old Apple ID or Google Account credentials and you would have restored your purchases. Pretty simple, correct? This menu is available on the side menu of your app.
if you mean you want to check the purchased items that already user buy it .. yes you can do like this
- (void) checkPurchasedItems { [[SKPaymentQueue defaultQueue] restoreCompletedTransactions]; } //You Call This Function //Then this delegate Function Will be fired - (void) paymentQueueRestoreCompletedTransactionsFinished:(SKPaymentQueue *)queue { purchasedItemIDs = [[NSMutableArray alloc] init]; NSLog(@"received restored transactions: %i", queue.transactions.count); for (SKPaymentTransaction *transaction in queue.transactions) { NSString *productID = transaction.payment.productIdentifier; [purchasedItemIDs addObject:productID]; } }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With