Neither Purchases.getCustomerInfo or Purchases.getProducts display the products.
I did the Entitlements and Products on App Store Connect first and then imported them so I know the names are correct. My only assumption now is that I am required to upload the archive build to App Store Connect before this will work maybe.
async subscriptionStatus() {
try {
const customerInfo = await Purchases.getCustomerInfo();
console.log('customerInfo ', customerInfo);
} catch (error) {
console.log('customerInfo error ', error);
}
try {
const productIds = 'enterprise_sub_v2', 'professional_sub_v2', 'starter_sub_v2'];
const products = await Purchases.getProducts({
productIdentifiers: productIds,
type: PRODUCT_CATEGORY.SUBSCRIPTION,
});
console.log('products ', products);
} catch (error) {
console.log('products error ', error);
}
}
async restorePurchases() {
try {
const customerInfo = await Purchases.restorePurchases();
console.log('restorePurchases customerInfo ', customerInfo);
} catch (error) {
console.log('restorePurchases error ', error);
}
}