You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apple for iOS tells me that the Restore of the purchase must be included:
Guideline 3.1.1 - Business - Payments - In-App Purchase
We still found that your app offers in-app purchases that can be restored but does not include a "Restore Purchases" feature.
To restore previously purchased in-app purchase products, it would be appropriate to provide a "Restore" button and initiate the restore process when the "Restore" button is tapped by the user.
Please see attached screenshots for details.
I created this part of the code, but it didn't work, is there a way to do it?
- (IBAction)restore:(UIBarButtonItem *)sender {
// Calls StoreObserver to restore all restorable purchases.
[[StoreObserver sharedObserver] restore];
}
#import "InAppPurchase.h"
@implementation StoreObserver
+ (instancetype)sharedObserver {
static StoreObserver *sharedInstance = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
sharedInstance = [[self alloc] init];
[[SKPaymentQueue defaultQueue] addTransactionObserver:sharedInstance];
});
return sharedInstance;
}
- (void)restore {
// Initiate the restore process
[[SKPaymentQueue defaultQueue] restoreCompletedTransactions];
}
#pragma mark - SKPaymentTransactionObserver
- (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray<SKPaymentTransaction *> *)transactions {
for (SKPaymentTransaction *transaction in transactions) {
switch (transaction.transactionState) {
case SKPaymentTransactionStateRestored:
// Handle the restored transaction
[self handleRestoredTransaction:transaction];
break;
case SKPaymentTransactionStateFailed:
// Handle the failed transaction
[self handleFailedTransaction:transaction];
break;
// Add more cases as needed
default:
break;
}
}
}
- (void)handleRestoredTransaction:(SKPaymentTransaction *)transaction {
// Implement the logic to process the restored transaction
// For example, unlock content, update UI, etc.
}
- (void)handleFailedTransaction:(SKPaymentTransaction *)transaction {
// Implement the logic to handle a failed transaction
// For example, show an error message to the user
}
@end
Steps to reproduce
When you buy an item, you delete the app and it does not ask you to restore when you install it again.
Is there an existing issue for this?
Describe the bug
Hello,
Apple for iOS tells me that the Restore of the purchase must be included:
I created this part of the code, but it didn't work, is there a way to do it?
InAppPurchase.m file:
InAppPurchase.m file
Steps to reproduce
When you buy an item, you delete the app and it does not ask you to restore when you install it again.
GDevelop platform
Desktop
GDevelop version
5.3.186
Platform info
OS (e.g. Windows, Linux, macOS, Android, iOS)
OS Version (e.g. Windows 10, macOS 10.15)
Browser(For Web) (e.g. Chrome, Firefox, Safari)
Device(For Mobile) (e.g. iPhone 12, Samsung Galaxy S21)
Additional context
No response
The text was updated successfully, but these errors were encountered: