need for 'restore purchase'

It seems that with StoreKit and using .currentEntitlementTask, there is no use for a 'restore purchases' button. Purchase information is restored automatically. But in the app review process, the reviewer thinks that there is still need for a 'restore purchase' option.

What should the 'restore purchases' action do? Is this documented for StoreKit in some place?

Answered by Masakaz in 775643022

Hi, As mentioned in the documentation, you can call this AppStore.sync() method.

https://developer.apple.com/documentation/storekit/appstore/3791906-sync

Task {
      // This call 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, such as tapping a button.
      try? await AppStore.sync()
}

I hope this helps.

Accepted Answer

Hi, As mentioned in the documentation, you can call this AppStore.sync() method.

https://developer.apple.com/documentation/storekit/appstore/3791906-sync

Task {
      // This call 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, such as tapping a button.
      try? await AppStore.sync()
}

I hope this helps.

I have the same problem. The review process demands "restore" functionality and says "restoring purchases on launch" is not acceptable. In the documentation it is mentioned with:

"Don’t automatically restore purchases, especially when your app launches. Restoring purchases prompts for the user’s App Store credentials, which interrupts the flow of your app."

Well ... this forbids to use .currentEntitlementTask or any other entitlements requesting tasks on start of the app because of the reason above.

need for 'restore purchase'
 
 
Q