Empty update when updating iOS In-App from SKProductsRequest initWithProductIdentifiers

I signed up for iOS auto-update in the app, now I'm trying to allow users to buy it in the React-Native app.

I found react-native-in-app-utils but it doesn't seem to even load my products. I have 3 "products" (renewable subscriptions) in iTunes connect, but when I try to download them:

 var products = [ 'com.xxxx.app.monthly', 'com.xxxx.app.6months', 'com.xxxx.app.year', ]; InAppUtils.loadProducts(products, (error, products) => { console.log('products:', products); }); 

just logs "products: []".

Digging a little deeper, I added some additional protocols to the objective-c code that executes the request, and looks like this:

 NSLog(@"loading products %@", productIdentifiers); if([SKPaymentQueue canMakePayments]){ SKProductsRequest *productsRequest = [[SKProductsRequest alloc] initWithProductIdentifiers:[NSSet setWithArray:productIdentifiers]]; productsRequest.delegate = self; _callbacks[RCTKeyForInstance(productsRequest)] = callback; [productsRequest start]; } else { callback(@[@"not_available"]); } 

Then in the callback:

 NSLog(@"products response %@", response.products); products = [NSMutableArray arrayWithArray:response.products]; NSMutableArray *productsArrayForJS = [NSMutableArray array]; for(SKProduct *item in response.products) { NSDictionary *product = @{ ... 

This will result in the registration of a “product download” with my product identifiers, as expected. But then "product response ()" ... an empty answer.

These products are listed in iTunes connect as "Ready to Submit." And they were added to the application information under an in-app purchase. What gives? Why do not products appear?

+7
ios react-native in-app-purchase
source share
1 answer

It seemed to be an administrative issue, not a technical one. The project manager did not enter into an agreement with the paid application.

0
source share

All Articles