I'm trying to set up In-App purchasing with the Store Kit at the moment. I've got the Store Kit programming guide but there's aspects which aren't clear. I'm trying to first of all, just get a response from iTunes connect with the following:
- (void)requestProductData {
SKProductRequest *request = [[SKProductsRequest alloc] initWithProductIndentifiers: [NSSet setWithObject: @"com.domain.appname.productid"]];
request.delegate - self;
[request start];
}
- (void)productsRequest:(SKProductsRequest *)request didRecieveResponse:(SKProductsResponse *)response {
NSArray *myProduct = response.products;
NSLog(@"array count: %i", [myProduct count]);
}
I have the storekit framework added - I have the Storekit.h added and the delegate in the .h. I have set up a test product in iTunes (in my code I have the full path instead of the sample above). But it always returns 0 for the Array count.
Does anyones have any experience with this? It seems there's very little documentation and no actual sample code.
Thanks!
UPDATE! I believe this is to do with App Ids and provisioning profiles now. It seems you need specific App Ids and Profiles for the App. I'm testing this out and will answer the question if this is right. Anyone else who can confirm it please do!