chirag04 / react-native-in-app-utils

A react-native wrapper for handling in-app payments
MIT License
890 stars 185 forks source link

LoadProducts() return empty array #189

Closed NarekChang closed 6 years ago

NarekChang commented 6 years ago

I added library in my xcode project and installed npm module and created puchases in iTunes Connect, but LoadProducts return only empty array. What am I doing wrong? Did I miss something? I'm used simulator and real device for build testing.

NarekChang commented 6 years ago

That's my fault. You need point purchases id's. I'm pointed my app id 👍

InAppUtils.loadProducts(['purchasId1', 'purchasId2'], (err, products) => { console.log(err); console.log(products); });

jose920405 commented 5 years ago

Thanks @NarekChang

I think that is confused. In the examples the identifiers it looks like the bundle identifier.

Thanks for clarification.

screen shot 2019-02-15 at 11 15 14 am

13arturbruno commented 5 years ago

I am Confused, What the problem with identifiers ? @

NarekChang commented 5 years ago

@13ArturBruno Nothing now

13arturbruno commented 5 years ago

I have a problem.

I can not return the products I added to my app on apple connect, I use the same productId from there, and even then the return comes empty. can you help me ?:

jose920405 commented 5 years ago

hi @13ArturBruno,

are you follow this threads?

https://stackoverflow.com/questions/7947805/ios-in-app-purchase-no-products-received/11707704#11707704

https://developer.apple.com/library/archive/technotes/tn2259/_index.html

NarekChang commented 5 years ago

@13ArturBruno Do you can show ur code?

13arturbruno commented 5 years ago

@jose920405 yes, i follow this steps..

13arturbruno commented 5 years ago

@NarekChang

i load product with

const identifiers = [
   'br.com.myapp.premium',
];

InAppUtils.loadProducts(identifiers, (error, products) => {
   console.log(products);
});
13arturbruno commented 5 years ago

My app was rejected, can I still use the products on it?

jose920405 commented 5 years ago

@13ArturBruno

I'm not sure about Apple's handling of rejected applications when talking about subscriptions. But it would not make sense that somehow this functionality is affected.

Let's review the following points:

1) 'br.com.myapp.premium', -> You have clear that this string is the product ID from the subscription and not the bundle identifier?

2) Your subscritions status is in Ready to Submit?.

3) Are you logged correctly in your real device with the Sandbox Tester Account?

4) Are you enable in-app purchase inside Capabilities tab?.

5) are you verified the response from canMakePayments?