I migrated my app to RC, however my previous users are having the sync problem.
Previously, I was not using a back-end for the subscriptions, so I was using the client-side receipt validation on iOS (React Native IAP package).
I am trying to sync my previous users, but a little bit confused about the steps;
if (isSubscribedInOldSystem && !isSubscribedInRevenueCat) {
Purchases.syncPurchases();
}
1 - What should I provide to the syncPurchases() function?
2 - If I need to provide the receipt, should I provide full receipt? or just the receipt body? I mean, I was using this validation method;
const receiptBody = {
'receipt-data': receipt, // Should I provide this to RC?
password: 'PASSWORD',
};
await IAP.validateReceiptIos(receiptBody, false)
.then(response => {
try {
const renewalHistory = response.latest_receipt_info;
const expirationDate = renewalHistoryt0].expires_date_ms;
const isExpired = Date.now() > expirationDate;
if (!isExpired) {
setIsUserHasReceiptOLD(true);
}
} catch (error) {
}
})
.catch(e => {
});
Thank you in advance,
Best,
Uğur