dooboolab-community / react-native-iap

In App Purchase module for React Native!
https://react-native-iap.dooboolab.com
MIT License
2.79k stars 638 forks source link

StoreKit2 getPendingPurchasesIOS not working -> wrong mapping in RNIapIosSk2.m and RNIapIosSk2.swift #2082

Closed herbertvuijk closed 1 year ago

herbertvuijk commented 1 year ago

I Description

I was using getPendingPurchasesIOS. This gives the following error:

[TypeError: (0, _internal.getIosModule)().getPendingTransactions is not a function. (In '(0, _internal.getIosModule)().getPendingTransactions()', '(0, _internal.getIosModule)().getPendingTransactions' is undefined)]

As you can see getPendingPurchasesIOS resolves to getPendingTransactions. But the function name in RNIapIosSk2.m and RNIapIosSk2.swift is pendingTransactions (no 'get').

Expected Behavior

I replaces all occurences of pendingTransactions with getPendingTransactions in the IOS module (RNIapIosSk2.m and RNIapIosSk2.swift) and then it worked. Alternatively I guess it can be changed on the RN side.

Environment:

andresesfm commented 1 year ago

Fixed here: https://github.com/dooboolab/react-native-iap/pull/2085 thank you @herbertvuijk

andresesfm commented 1 year ago

released on 12.3.3