dooboolab-community / react-native-iap

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

StoreKit2: appAccountToken is always null on the JS side #2269

Closed zarv1k closed 1 year ago

zarv1k commented 1 year ago

Description

TransactionSk2.appAccountToken is always null

Expected Behavior

TransactionSk2.appAccountToken is UUID string when provided in purchaseRequest

Environment:

To Reproduce Steps to reproduce the behavior:

setup({ storekitMode: 'STOREKIT2_MODE' });
// ...
const sku = 'com.example.product';
// ...
await requestPurchase({
  quantity: 1,
  appAccountToken: '73d7bd1d-0d44-4600-86b8-4222570a0931',
  sku,
  andDangerouslyFinishTransactionAutomaticallyIOS: false,
});
// ...
const transactionSk2 = await IapIosSk2.latestTransaction(sku);
console.log(transactionSk2.appAccountToken); // null but should be '73d7bd1d-0d44-4600-86b8-4222570a0931'

Additional Context

It seems like the native UUID (including optional UUID?) instance serialization is broken on the react-native-iap lib side or on the RN bridge side

andresesfm commented 1 year ago

Thank you @zarv1k . Released as 12.8.1