SDK Version: 45.0.0
Platform: IOS
Hi Everyone,
Is there anyone who recently integrated In App Purchases? We are trying to import this library to our project and nothing seems to be working. It is not even working with a bare boilerplate project. There might be a compatibility issue, is there any workaround for this? Our app is rejected due to payment and we really need to add IAP. We have been trying to make IAP API work for days now and nothing seems to be working.
To recreate the issue, do a simple bare workflow setup:
expo init --template bare-minimum
expo install expo-in-app-purchases
npm install expo-in-app-purchases
npx pod-install
Import the library to App.js and run expo start
import { StatusBar } from 'expo-status-bar';
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import * as InAppPurchases from 'expo-in-app-purchases';
export default function App() {
return (
<View style={styles.container}>
<Text>Open up App.js to start working on your app!</Text>
<StatusBar style="auto" />
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});
Snack link is here.
Here is the issue: In App Purchase - Native Module Cannot Be Null Error · Issue #17581 · expo/expo · GitHub
Does anyone know how to fix this_