Shakti
Shakti

Reputation: 1959

In App Purchase for iPhone

I am developing a iPhone app. For that i have successfully add the In App Purchase functionality. It is working perfectly for a single item purchase. My problem is that How can i do this for multiple item purchase with single purchase request to App Store? Can anybody help me for this?

Upvotes: 2

Views: 1230

Answers (2)

Chandan Shetty SP
Chandan Shetty SP

Reputation: 5117

You can use quantity property in SKPayment... Read how many items you want from user then pass this value to payment.quantity(By default it is 1).

SKPayment *payment = [SKPayment paymentWithProductIdentifier:inProductID];
payment.quantity = mNoOfItemsYouWant;
[[SKPaymentQueue defaultQueue]addTransactionObserver:mTransactionObserver];
[[SKPaymentQueue defaultQueue] addPayment:payment];

Upvotes: 2

psychotik
psychotik

Reputation: 39029

Each purchase needs authorization from the user, so I don't think you can do what you want to.

However, you can make a single in-app purchase which is priced and behaves like multiple items clubbed together. For instance:

  • Item 1 - $.99
  • Item 2 - $.99
  • Item 3 - $.99
  • Bundle (includes 1, 2, 3) - $1.99

Upvotes: 0

Related Questions