First In App Purchase - Invalid product id

this is the first time I set up an In App Purchase and I am stuck. When I try to make a Product Request I receive the error "Invalid product id: TVRBIBLIA001". I was seeing several questions in Stack Overflow looking for possible solutions without success, so, I post my own. This is the set up of my In App Purchase.

In App Purchase Set Up 1 In App Purchase Set Up 2

And this is my code:

#pragma mark -
#pragma mark Remove Ads InApp Purchase
- (IBAction)requestRemoveAdsProductData
{
    NSSet *productIdentifiers = [NSSet setWithObject:@"TVRBIBLIA001"];
    productsRequest = [[SKProductsRequest alloc] initWithProductIdentifiers:productIdentifiers];
    productsRequest.delegate = self;
    [productsRequest start];

    // we will release the request object in the delegate callback
}

#pragma mark -
#pragma mark SKProductsRequestDelegate methods

- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response
{
    NSArray *products = response.products;
    removeAdsProduct = [products count] == 1 ? [[products firstObject] retain] : nil;
    if (removeAdsProduct)
    {
        NSLog(@"Product title: %@" , removeAdsProduct.localizedTitle);
        NSLog(@"Product description: %@" , removeAdsProduct.localizedDescription);
        NSLog(@"Product price: %@" , removeAdsProduct.price);
        NSLog(@"Product id: %@" , removeAdsProduct.productIdentifier);
    }

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

    // finally release the reqest we alloc/init’ed in requestProUpgradeProductData
    [productsRequest release];

    [[NSNotificationCenter defaultCenter] postNotificationName:kInAppPurchaseManagerProductsFetchedNotification object:self userInfo:nil];
}

Upvotes: 2

Views: 2908

Answers (1)

Solution: Deleted the App from the device and reinstalled id. Via

Upvotes: 1

Related Questions