Skip to content
New issue

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

requestPurchaseWithQuantityIOS is not a function #2711

Open
hotaryuzaki opened this issue Mar 25, 2024 · 0 comments
Open

requestPurchaseWithQuantityIOS is not a function #2711

hotaryuzaki opened this issue Mar 25, 2024 · 0 comments

Comments

@hotaryuzaki
Copy link

hotaryuzaki commented Mar 25, 2024

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);
  };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant