0

I'm trying to add an in-app purchases for my App,

I've added a product in iTunes-Connect, and its status is Ready to Submit now.

But I can not get the valid product in function

-(void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response
{
    NSArray *myProduct = response.products;
    NSLog(@"%@", response.invalidProductIdentifiers);
    if(myProduct.count == 0)
    {
        return;
    }

    SKPayment *payment = [SKPayment paymentWithProduct:myProduct[0]];

    [[SKPaymentQueue defaultQueue] addPayment:payment];
}

the array of product is always empty, is there any step I miss?

My tax info is not finished for some reasons, is there realtionship with the problem?

Aleksander Azizi
  • 9,829
  • 9
  • 59
  • 87
Rick
  • 235
  • 4
  • 13
  • is your product ID defined in viewDidLoad? paste your code for IAP – Done May 23 '16 at 12:15
  • Defined, @Done `-(void)getProductInfo { NSSet *set = [NSSet setWithArray:@[@"com.coins.test"]]; SKProductsRequest *req = [[SKProductsRequest alloc] initWithProductIdentifiers:set]; req.delegate = self; [req start]; } ` – Rick May 24 '16 at 01:40

1 Answers1

0

Make sure you test it on a real Apple TV (connected via USB) and not on the simulator!

That was my problem on not getting valid product IDs.

Ricardo Barroso
  • 634
  • 9
  • 11