This issue only occurs in the iOS production environment. (It does not occur in the sandbox)
I have confirmed it on iOS 14 and 15.
I’m using `Purchases.restoreTransactions()`. （cordova-plugin-purchases 2.3.1）
15:14:27.024184+0900>>[Purchases] - DEBUG: ℹ️ Force refreshing the receipt to get latest transactions from Apple.
15:14:28.693200+0900>>[Purchases] - DEBUG: ℹ️ Loaded receipt from url file:///private/var/mobile/Containers/Data/Application/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/StoreKit/receipt
15:14:28.694566+0900>>[Purchases] - INFO: ℹ️ Parsing receipt
15:14:28.696696+0900>>[Purchases] - INFO: ℹ️ Receipt parsed successfully
15:14:28.697186+0900>>[Purchases] - DEBUG: ℹ️ Found 0 unsynced attributes for App User ID: $RCAnonymousID:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
15:14:28.703572+0900>>[Purchases] - DEBUG: ℹ️ There are no requests currently running, starting request POST /receipts
15:14:28.703855+0900>>[Purchases] - DEBUG: ℹ️ API request started: POST /v1/receipts
15:14:29.316797+0900>>[Purchases] - DEBUG: ℹ️ API request completed with status: POST /v1/receipts 200
15:14:29.325280+0900>>[Purchases] - DEBUG: ℹ️ Serial request done: POST /receipts, 0 requests left in the queue
15:14:29.325684+0900>>[Purchases] - DEBUG: ℹ️ Sending updated PurchaserInfo to delegate.
Why do I get `Receipt parsed successfully` if I haven't purchased anything yet?
Is it wrong to be able to press the restore button before purchase in the first place?
Is there any way to know the status right after installing the app?
I'm sorry for my bad English.
I look forward to hearing from you.
Best answer by sundeepView original
@Natsuru Shirose! The receipt doesn’t mean that any purchases were made - a receipt is automatically generated on-device as a way to keep track of purchase history. A receipt can contain no transactions. Those messages are just letting you know the SDK captured the receipt successfully.
It’s not wrong to be able to click Restore Purchases before purchases are made - all this will do is download the latest receipt for that user from Apple to make sure the device has all of the history it needs. This helps users maintain their purchase history across devices and app installs. You can read more about why you need this button and where to put it in your app here:
Thank you for reply,
Is my understanding of `There should be no problem with restoring before purchase.` correct?
Why Purchases.restoreTransactions() stops after output the log of `DEBUG: ℹ️ Sending updated PurchaserInfo to delegate.` ?