dooboolab-community / react-native-iap

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

Missing `verificationResultIOS` when calling `getAvailablePurchases({onlyIncludeActiveItems: true})` iOS Storekit2 #2533

Open cervebar opened 10 months ago

cervebar commented 10 months ago

Description iOS - Storekit 2

When calling getAvailablePurchases({onlyIncludeActiveItems: true}) the field verificationResultIOS (aka jwsRepresentation) is empty.

We found that the cause (probably) is that it is serialized only as transaction. Related code is getAvailableItems in RNIapIosSk2.swift#L576 and IapSerializationUtils.swift#L140. This should be called instead - with the verificationResult IapSerializationUtils.swift#L179.

Expected Behavior

verificationResultIOS is not empty after calling getAvailablePurchases

Environment:

To Reproduce

const activeSubscriptions = await getAvailablePurchases({onlyIncludeActiveItems: true})
console.log(JSON.stringify(activeSubscriptions, null, 2))

marianolc commented 4 months ago

+1 Having the same issue

anatooly commented 3 months ago

some issues

harrymash2006 commented 3 months ago

I am also having the same issue. Did anyone find the solution?