Calling store.restore() after store.init()

Is it really needed to call store.restore() after store.init() as in the sample code?

I can’t see any reason for this.

Hi ingemar,

When using Amazon IAP, store.restore() serves the same functionality as it does in the Corona store library. It is used to discover what entitlements and subscriptions the currently logged in user has already purchased. Even if you retain this information on the device it is important to call store.restore() incase an item is revoked or the user buys an entitlement or subscription on another device.

If your app only uses consumable content than the use of restore is not needed.

Thank you for your question. We will update the documentation to make this more clear.

-Preston

Thanks for the clarification. Now it makes sense.

I’m in the process of implementing this now.

If there are no products to restore, will the transaction callback be called with a “failed” state or will the callback simply be ignored?

Hi ingemar,

If restore() is called and the user has no entitlements the callback will not be executed.

-Preston

Hi ingemar,

When using Amazon IAP, store.restore() serves the same functionality as it does in the Corona store library. It is used to discover what entitlements and subscriptions the currently logged in user has already purchased. Even if you retain this information on the device it is important to call store.restore() incase an item is revoked or the user buys an entitlement or subscription on another device.

If your app only uses consumable content than the use of restore is not needed.

Thank you for your question. We will update the documentation to make this more clear.

-Preston

Thanks for the clarification. Now it makes sense.

I’m in the process of implementing this now.

If there are no products to restore, will the transaction callback be called with a “failed” state or will the callback simply be ignored?

Hi ingemar,

If restore() is called and the user has no entitlements the callback will not be executed.

-Preston