Hi all,
In flutter project, we are using the syncPurchases method to automatically sync transactions when users launch the app. However, we are encountering an issue where the login prompt always appears when calling syncPurchases in the sandbox environment. This issue was resolved when I created and logged with Apple Store sandbox account.
The documentation mentions using syncPurchases instead of restorePurchases to perform a silent sync without triggering any prompts. Below is the code snippet we are implementing, which runs when the app launches.
bool reloadData() async {
try {
await Purchases.syncPurchases();
await fetchProducts();
return true;
} catch (e) {
return false;
}
}
I have the following questions:
- In what specific cases does calling syncPurchases trigger the login prompt?
- In the release version on the App Store (not sandbox), will calling syncPurchases still display the login prompt?
Since this is an urgent matter, I hope the team can review and respond as soon as possible.
Thank you!