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 2 years ago • 1 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

same

anirudhjakhmola avatar Nov 14 '24 12:11 anirudhjakhmola

I’m closing all issues reported in versions below 14, as the library now supports the new architecture with NitroModules and has been completely revamped.

hyochan avatar Sep 30 '25 18:09 hyochan