We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
{ framesToPop:1, code: E_NOT_PREPARED, line:135, column:4004, sourceURL:"index.android.bundle" }
try { const purchases = await RNIap.getAvailablePurchases(); let purchase = ''; purchases.forEach(p => { if (p.productId === PREMIUM_ANDROID_SUBSCRIBE_ID) { purchase = PURCHASED; } }); return purchase; } catch (err) { showAlert('ERROR getAndroidPurchases', JSON.stringify(err)); return ''; } };
The text was updated successfully, but these errors were encountered:
@Emberice86 Did you call await RNIap.prepare() before calling await RNIap.getAvailablePurchases()?
await RNIap.prepare()
await RNIap.getAvailablePurchases()
Sorry, something went wrong.
Man, thanks a lot! I absolutely forgot about this! You saved my time!
No branches or pull requests
Version of react-native-iap 0.3.0-beta5
Expected behavior Receive list of user's purchases
Actual behavior Receive next Error:
{
framesToPop:1,
code: E_NOT_PREPARED,
line:135,
column:4004,
sourceURL:"index.android.bundle"
}
Steps to reprodue the behabior
try {
const purchases = await RNIap.getAvailablePurchases();
let purchase = '';
purchases.forEach(p => {
if (p.productId === PREMIUM_ANDROID_SUBSCRIBE_ID) {
purchase = PURCHASED;
}
});
return purchase;
} catch (err) {
showAlert('ERROR getAndroidPurchases', JSON.stringify(err));
return '';
}
};
The text was updated successfully, but these errors were encountered: