mercredi 7 janvier 2015

In-App purchase testing not returning product identifier

I signed in to itunes connect and created my app by entering all informations and screenshots required. Currently the status is "Prepare for Submission"(Am I supposed to "submit for review" before I could test in-app purchase?). I went to the In-App Purchases section and added my in-app purchase with all the product id, apple id, type, and screenshot setup. The status is currently "Ready to Submit". I write the code to test in-app purchase, but the product identifier that I setup in itunes connect is not found. What did I do wrong?


Code for testing itunes connect:



- (void)requestProUpgradeProductData
{

NSSet *productIdentifiers = [NSSet setWithObject:@"-->my product identifier here<--" ];

productsRequest = [[SKProductsRequest alloc] initWithProductIdentifiers:productIdentifiers];
productsRequest.delegate = self;
[productsRequest start];

}

- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response
{

NSArray *products = response.products;

proUpgradeProduct = [products count] == 1 ? [products firstObject] : nil;
if (proUpgradeProduct)
{
NSLog(@"Product title: %@" , proUpgradeProduct.localizedTitle);
NSLog(@"Product description: %@" , proUpgradeProduct.localizedDescription);
NSLog(@"Product price: %@" , proUpgradeProduct.price);
NSLog(@"Product id: %@" , proUpgradeProduct.productIdentifier);
}

for (NSString *invalidProductId in response.invalidProductIdentifiers)
{
NSLog(@"Invalid product id: %@" , invalidProductId);
}

}

Aucun commentaire:

Enregistrer un commentaire