"The item you tried to buy is no longer available" storekit error in iphone sdk

Posted by aloo on Stack Overflow See other posts from Stack Overflow or by aloo
Published on 2010-06-15T03:37:36Z Indexed on 2010/06/15 3:42 UTC
Read the original article Hit count: 323

Hi all,

I'm trying to use the StoreKit API in OS3.0 for the iphone to do in app purchase. However, I'm getting the following error when trying to purchase something in the SANDBOX ENVIRONMENT.

The item you tried to buy is no longer available [Environment: Sandbox]

Here's the code I use to do the payments:

SKPayment* payment = [SKPayment paymentWithProductIdentifier:model.productId];
[[SKPaymentQueue defaultQueue] addPayment:payment];

I've also queried storekit for the list of available products and that seems to work just fine returning the same product identifiers that I'm now using to purchase the item.

I have all the products setup in iTunes Connect and created a test user. Before debugging the app I signed out of the store in the settings menu and entered my test account and password when debugging my own app.

What could be going on here?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about iphone-sdk