Assist the user with store setup and allow continuing anyway.
This commit is contained in:
@@ -109,11 +109,28 @@ PearlAssociatedObjectProperty( NSMutableArray*, ProductObservers, productObserve
|
||||
@"you have a payment method added to the account and purchases are"
|
||||
@"not disabled under General -> Restrictions."
|
||||
viewStyle:UIAlertViewStyleDefault initAlert:nil
|
||||
tappedButtonBlock:nil cancelTitle:@"Thanks" otherTitles:nil];
|
||||
tappedButtonBlock:^(UIAlertView *alert, NSInteger buttonIndex) {
|
||||
if (buttonIndex == alert.cancelButtonIndex)
|
||||
// Cancel
|
||||
return;
|
||||
if (buttonIndex == alert.firstOtherButtonIndex) {
|
||||
// Settings
|
||||
[PearlLinks openSettingsStore];
|
||||
return;
|
||||
}
|
||||
|
||||
// Try Anyway
|
||||
[self performPurchaseProductWithIdentifier:productIdentifier quantity:quantity];
|
||||
} cancelTitle:@"Cancel" otherTitles:@"Settings", @"Try Anyway", nil];
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
[self performPurchaseProductWithIdentifier:productIdentifier quantity:quantity];
|
||||
}
|
||||
|
||||
- (void)performPurchaseProductWithIdentifier:(NSString *)productIdentifier quantity:(NSInteger)quantity {
|
||||
|
||||
for (SKProduct *product in [self.products allValues])
|
||||
if ([product.productIdentifier isEqualToString:productIdentifier]) {
|
||||
SKMutablePayment *payment = [SKMutablePayment paymentWithProduct:product];
|
||||
|
Reference in New Issue
Block a user