Reputation: 3602
I finished coding my App 2 months ago and still unable to put it on Apple's store. I want to add in-app purchase capability to my App. I filled the iOS paid apps contract. I created an in-app purchase product. When I call from my code to get the list of products, I keep getting an empty list. I tried posting my app with the product, but got rejected by apple on "metadata" telling me that I don't have the in-app purchase code in my app. Well, of course I don't have, because I can't get the item from the code (objective-c of course), and I thought that by submitting my app I will get approved.
Does anyone can help on this one? I really don't know how can this issue be resolved. What am I missing?
Here is the code I am using:
- (void) requestProductData
{
if([SKPaymentQueue canMakePayments]) {
NSLog(@"IN-APP:can make payments");
}
else {
NSLog(@"IN-APP:can't make payments");
}
SKProductsRequest *request= [[SKProductsRequest alloc]
initWithProductIdentifiers: [NSSet setWithObject: @"com.mycomp.myapp"]];
request.delegate = self;
[request start];
}
- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:
(SKProductsResponse *)response
{
NSArray *myProduct = response.products;
NSLog(@"items: %i", [myProduct count]);
[request autorelease];
}
Upvotes: 1
Views: 1222
Reputation: 57
Before IOS 5.0 Store Kit does not operate in iOS Simulator. When running your application in iOS Simulator, Store Kit logs a warning if your application attempts to retrieve the payment queue. Testing the store must be done on actual devices.
And you can not test on the jailbreaked device.
Upvotes: 2