0

I've integrated RevenueCat to my iOS application, it's using React Native. I'm using physical devices:

  1. iPhone 13 17.5.1
  2. iPhone X 16.3

I've also tested Virtual Devices:

  1. iPad Air (5th generation) 17.5.1

Payment Button:

    <View style={{width: '90%', marginTop: 20}}>
    <TouchableOpacity style={[styles.button, {width: '80%', alignSelf: 'center', backgroundColor: '#eeeeee', padding: 10, width: '100%', borderRadius: 20, marginBottom: 10}]} onPress={() => this.buyProduct()}>
      <Text style={{ color: '#333', textAlign: 'center', fontWeight: 'bold' }}>{global.I18n.t('payNow')}</Text>
    </TouchableOpacity>
    </View>

The code to make the purchase is:

  async buyProduct() {
      const user = JSON.parse(await AsyncStorage.getItem('user'));
      await Purchases.setAttributes({
        email: user.user.email
      });
  
      this.setState({isLoading: true});
      const offerings = await Purchases.getOfferings();
      let customerInfo, productIdentifier;
      try {
       customerInfo, productIdentifier = await Purchases.purchasePackage(offerings.current.availablePackages[0]);
      } catch (e) {
        this.setState({isPremium: false, isLoading: false});
      }

    this.setState({isPremium: true, isLoading: false});
  }

And I'm checking if the user has purchased a plan when visiting the Purchase.js view:

  async checkSubscriptionStatus() {
    try {
      const customerInfo = await Purchases.getCustomerInfo();
  
      // Check if the customer has any active entitlements
      const activeSubscriptions = customerInfo.entitlements.active;
      const isSubscribed = Object.keys(activeSubscriptions).length > 0;
      this.setState({isPremium: isSubscribed});
      console.log('Is Subscribed:', isSubscribed);
      return isSubscribed;
    } catch (error) {
      this.setState({isPremium: false});
      console.error('Error fetching customer info:', error);
      return false;
    }
  };

As I've previously mentioned I have tested this on physical devices and virtual devices and it works as intended. I've tested with debug mode, release mode, and from Testflight. However the Apple review team claims that it doesn't work and that the "Pay now" button is not triggering a payment, and rejects the app.

Specifically, your app was not responsive when we tapped on Pay now button under paywall. Please review the details and resources below and complete the next steps.

Review device details: 

- Device type: iPad Air (5th generation) 
- OS version: iOS 17.5.1

Have anyone stumbled upon a similar issue and know what to do? I'm not sure what to do on my end, I have a hard time reproducing the effect that they had

2
  • After further investigation it seems that the offerings are empty when the Apple Review team is reviewing this. Why is that?
    – Aces
    Commented Jul 8 at 22:36
  • That would be because you didn't submit your subscription items simultaneously with the app submission.
    – Toru
    Commented Jul 14 at 13:15

0

Browse other questions tagged or ask your own question.