Oleksandr Matrosov
Oleksandr Matrosov

Reputation: 27133

Testing In App Purchase issues. IAP iOS

I have got one big problem with an IAP purchase testing.

There are next steps which I have made:

  1. Create App ID (com.domainname.appname)
  2. Create Development Provisioning Profile with an App ID (com.domainname.appname)
  3. Create App on iTunes Connect (Bundle ID com.domainname.appname)
  4. Manage IAP. Create non-consumable products with Product ID com.testitem1, com.testitem2, com.testitem3 (there is Ready to Submit status for each products)

Configurate XCode project settings

Device

iPod Touch 4gen iOS 5.1.1

Write source code

My class support SKProductsRequestDelegate

in - viewDidLoad callback method I have wrote these lines:

if ([SKPaymentQueue canMakePayments])
{
    NSLog(@"YES, I CAN MAKE PAYMENTS");
}
else
{
    NSLog(@"NO, I CAN NOT MAKE PAYMENTS"); 
}

On this stage everything is okay. I can make payments.

Next, I'm try to create request for my products:

SKProductsRequest *request = [[SKProductsRequest alloc] initWithProductIdentifiers: [NSSet setWithObjects:@"com.testitem1", @"com.testitem2", @"com.testitem3", nil]];
request.delegate = self;
[request start];

On this stage everything is okay also and on next stage my request object invoke callback method below:

- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response
{
    NSArray *myProduct = response.products;
    NSLog(@"%@", myProduct);
}

But there are not any products in response and I can not understand why.

I already have this problem before (i just reset my device and everything worked good), but in this case I can not figure out what's wrong.

Upvotes: 5

Views: 4096

Answers (2)

Oleksandr Matrosov
Oleksandr Matrosov

Reputation: 27133

I have went through this guide:

https://developer.apple.com/library/ios/#technotes/tn2259/_index.html

In my case this is was related that I have not got Banking Information. If you want to test your IAP you must have an iOS Paid Applications contract (iOS) with a your tax information.

Upvotes: 5

Eric
Eric

Reputation: 16921

This happens because you haven't yet uploaded the app's binary in iTunes Connect. Go to iTunes Connect, upload the app's binary. Once it's uploaded, reject it straight away so that it's marked as "Developer Rejected".

This is a necessary step for you to receive SKProductResponse if it's the first version of your app. It won't affect your app's review.

Upvotes: -1

Related Questions