Even though StoreKit 2 keeps everything in sync automatically, the HIG still requires us to have Restore Purchase button. In Original API for In-App Purchase we’d either call SKRefreshReceiptRequest or restoreCompletedTransactions() on instance of SKPaymentQueue. In StoreKit 2 an equivalent to that would be AppStore.sync().
In regular operations, there’s no need to call
sync(). StoreKit automatically keeps up to date transaction information and subscription status available to your app.
Sounds like this is just a placeholder so that we have “something” to support the behaviour that is not required anymore: Restore Purchase. But if you implement this call, be aware that it may prompt user, just like SKRefreshReceiptRequest does:
Calling
sync()displays a system prompt that asks users to authenticate with their App Store credentials. Call this function only in response to an explicit user action, like tapping or clicking a button.