iOS - In App Purchase suddenly stopped working

2019-09-07 02:50发布

问题:

I have developed an application for a customer over a year ago. This app has In App Purchases, and my customer have been receiving money from her clients that use the app, I can clearly see that in iTunesConnect. Last time someone bought something was in november.

But now all of a sudden, this has stopped working!!! And I don't understand why. I've checked the Bundle Identifier from XCode which maches the one in AppStore. Also the product names are equal.

I downloaded the app a couple of minutes ago from AppStore and used the command idevicesyslog in order to see all the console output. And the problem is this:

-(void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response{
NSArray *products = response.products;

   if (products.count != 0)
   {
       self.product = products[0];
       NSLog(@"pro: %@", self.product.localizedTitle);
        SKPayment *payment = [SKPayment paymentWithProduct:self.product];
        [[SKPaymentQueue defaultQueue] addPayment:payment];
    } else {
        self.pro1Btn.enabled = YES;
        self.pro2Btn.enabled = YES;
        NSLog(@"pro: not found"); // THIS WAS SHOWN IN CONSOLE OUTPUT
    }
}

So the product is never found, but I can clearly see in iTunesConnect that Product ID are the same. They are pro3 and pro6.

Please, help!

EDIT: I can now see the iOS Distribution (Provisioning Profile) has expired! Can it be that? And how to solve it?

回答1:

Apparently, the contracts in "Agreements, Tax, and Banking" had been expired. So I requested both of them.