react-native-iap icon indicating copy to clipboard operation
react-native-iap copied to clipboard

requestPurchaseWithQuantityIOS is not a function

Open hotaryuzaki opened this issue 3 months ago • 0 comments

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);
  };

hotaryuzaki avatar Mar 25 '24 08:03 hotaryuzaki