I am getting invalid identifier problem while requesting for product information
I have done the following thing:
-
I have added my application to the iTunes connect and the bundle identifier matches with that of the one in programme portal.
-
I have enabled in app purchase in programme portal for the app id and created provision profile for that and installed on the device.
-
Created test account with the product identifier and price and name.
-
I have included the code below in my project
NSString *str = [[NSString alloc] initWithFormat:@"//Same as the Product Id displayed in Itunes Connect//"]; SKProductsRequest *request= [[SKProductsRequest alloc] initWithProductIdentifiers:[NSSet setWithObject:str]]; request.delegate = self; [request start]; } - (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response{ NSArray *myProduct = response.products; NSArray *invalidProdId = response.invalidProductIdentifiers; UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"product" message:[myProduct objectAtIndex:0] delegate:nil cancelButtonTitle:@"purchse" otherButtonTitles:@"cancel"]; [alert show]; [alert release]; [request autorelease]; }
But I am getting my productid as invalid.
Please help me if anyone have any idea!
if you tried everything but still get invalid product id, in case your device is jailbroken, try factory restore. I tried everything and didn’t get it to work til i restored to factory version. Somehow jailbroken device is not able to test out in app purchase