react-native-iap
react-native-iap copied to clipboard
requestPurchaseWithQuantityIOS is not a function
Please use the Discussion board if you want to get some help. Please use issues to report bugs.
Description
i want to purchase with quantity using requestPurchaseWithQuantityIOS, but returns error "is not a function" requestPurchaseWithQuantityIOS was undefined, so i checked in the package and i cannot find that function in the node_modules/react-native-iap.
is this function removed?? but why it still in the docs??
TypeError: (0, _reactNativeIap.requestPurchaseWithQuantityIOS) is not a function. (In '(0, _reactNativeIap.requestPurchaseWithQuantityIOS)("03", 3)', '(0, _reactNativeIap.requestPurchaseWithQuantityIOS)' is undefined)
Expected Behavior
can purchase with quantity using requestPurchaseWithQuantityIOS
Screenshots
Environment:
- react-native-iap: 12.13.0
- react-native: 0.71.14
- Platforms (iOS, Android, emulator, simulator, device): iOS, emulator
here is the code
import { purchaseUpdatedListener, requestPurchaseWithQuantityIOS, useIAP } from 'react-native-iap';
...
const handlePurchase = async (sku, quantity) => {
await requestPurchaseWithQuantityIOS(sku, quantity);
};