I have got one big problem with an IAP purchase testing.
There are next steps which I have made:
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With