Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Turning off an in-app purchase?

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

We're re-working our pricing, and instead of offering individual episodes for purchase, we want to have it as simply an entire pack of episodes.

My question is this: If I set my old identifiers to NOT cleared for sale, would a user who previously purchased that content still be allowed access to it? (Meaning if I query whether they've purchased it, will it return true)

I'm new to the in-app purchase side of apps, and I'm not entirely sure how that works.

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

Thanks in advance for any insight

like image 338
KaosDG Avatar asked May 24 '11 22:05

KaosDG


People also ask

Can I turn off in-app purchases?

You can turn in-app purchases on or off in the Settings app on Apple devices and in the Play Store app on Android devices. There are three types of in-app purchases: unlockables, expendables, and subscriptions.

How do you stop in-app purchases on iPhone?

Sign in to reportaproblem.apple.com. Tap or click "I'd like to," then choose "Request a refund." Choose the reason why you want a refund, then choose Next. Choose the app, subscription, or other item, then choose Submit.


1 Answers

When using [[SKPaymentQueue defaultQueue] restoreCompletedTransactions];, Apple will return all completed transactions in a SKPaymentQueue which is a collection of transactions. The transaction will contain the the payment object. The payment object will contain the productIdentifier. This info is available despite your deletion. Thus you may honor past purchases that are no longer for purchase.

Here is some example 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;
        }
    }
}
like image 147
dredful Avatar answered Oct 23 '22 12:10

dredful