Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

  • Bundle identifier: com.domainname.appname

  • Code Signing Identity: Development Provisioning Profile that I have made on the step 2

  • Deployment target: 4.0

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.

like image 659
Matrosov Oleksandr Avatar asked Oct 08 '22 06:10

Matrosov Oleksandr


1 Answers

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.

like image 135
Matrosov Oleksandr Avatar answered Oct 13 '22 11:10

Matrosov Oleksandr