Reputation: 3454
My app was rejected from apple because it does not have a restore button, but I am using MKStoreKit, so if the app is purchased and the the device is wiped and the user click my purchase button again, it does re-download and 'restore' the app.
So, can someone explain what they are asking me to do? I thought MKStoreKit handled this for me.
Thanks
Upvotes: 0
Views: 3256
Reputation: 51
Just call restorePreviousTransactionsOnComplete
#import "MKStoreManager.h"
-(void)restorePreviousPurchase{
[[MKStoreManager sharedManager]restorePreviousTransactionsOnComplete:^{NSLog(@"RESTORED PREVIOUS PURCHASE");} onError:nil];
}
Upvotes: 5
Reputation: 55
- (IBAction) RestoreCompletedTransactions:(id)sender
{
[[SKPaymentQueue defaultQueue] addTransactionObserver:self];
[[SKPaymentQueue defaultQueue] restoreCompletedTransactions];
}
Not sure about the button though, I guess mine is always displayed.
Upvotes: 1
Reputation: 69499
Somewhere in your app you need to add a restore button, which will allow the user to restore there previous purchases.
MKStoreKit
does all this, but you will need to add the button to UI
your self.
Then you can call the restorePreviousTransactionsOnComplete:onError:
method on MKStoreManager
Upvotes: 1