I am trying to integrate Revenue cat in my React native android project but cannot get rid of this error
>TypeError: Cannot read property 'setupPurchases' of null]
please provide me steps to solve this error as i have gone through all the above steps read articles watched videos implemented example and in every thing this error is common please help on this @React native team , @ Revenue cat community
Page 1 / 1
From couple of weeks i am struggling to solve this error with no luck followed all the steps from documentation , to youtube tutorial but nothing is working kindly help to resolve this error
Hi
import { Platform } from 'react-native';
//...
export default class App extends React.Component {
componentDidMount() {
Purchases.setLogLevel(Purchases.LOG_LEVEL.DEBUG);
if (Platform.OS === 'ios') {
await Purchases.configure({ apiKey: <public_apple_api_key> });
} else if (Platform.OS === 'android') {
await Purchases.configure({ apiKey: <public_google_api_key> });
// OR: if building for Amazon, be sure to follow the installation instructions then:
await Purchases.configure({ apiKey: <public_amazon_api_key>, useAmazon: true });
}
}
}
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.