IAP iOS store.restore() no any callback.

  1. Corona: Version 2017.3154 (2017.9.25)

  2. iOS SDK: 11.0

  3. iTunes Connect set up correctly.

 - My App > Features > In-app purchases (Ready to summit)

 - Users and Roles > Sandbox Testers > Testers (US store)

  1. and Bundle ID checked.

purchase() works fine. (Consumable, Non-Renewing Subscription)

But the restore() has no callbacks.

Do your test users have any products to restore that they’ve purchased in the past?

If they don’t, your restore() call will never receive a callback.  You send a call to restore() and just get silence in return.

Simon

To Corona

restore () allowed only for Non-Consumable and Auto-Renewable Subscription?

Consumable - No callback

Non-Renewing Subscription - No callback

Non-Consumable - OK

Auto-Renewable Subscription - OK

@happymongoose

Subscription Group

1 Week

1 Month

1 Year

I created the group as above.

I would like to use Apple’s Purchase and Restore only, without my separate server.

Question 1.

How do I determine my subscription renewal / cancellation?

Question 2.

It’s related to Question 1.

For example, after signing up for a subscription, logging out an ID from the App Store,

When I go back into the app, I think I need to check if it’s a valid user.

Do you check every time your app is activated by question 1?

restore() only makes sense for non-consumable items. Apple does not let you restore consumable items.  I’ve not worked with subscriptions, but that sounds about right too. Non-auto renewable subscriptions are like consumable items in they are one time use items. There is no need to restore them.

Rob

I found this.

https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/Subscriptions.html

How should Corona handle Expiration and Renewal, Cancellation, and Status updates?

Please help me.

When store.init() is called, any pending transactions will come in to your transaction listener function. It’s up to you on how handle and track the subscription data.

Rob

I encounter exact this problem. When NOT logged in with an Apple ID I get asked to log in. If already logged in with a testuser I just get no action at all and the screen stays as it is.

Do I have to manually stop this when the store.restore() call is not getting anything back from the transactionListener function?

Shouldn’t a store.restore() call even get into the listener without any non-consumable purchases (before)?

This bit of store functionality is counter-intuitive.

store.restore() will only call your transactionListener if there are products to restore.   If the user doesn’t have any, your transactionListener will never received a callback (ie. all it will hear is a deafening silence.)

Now, there’s an obvious problem here - how long do you wait until you decide that the App Store is never going to get back in touch?  It’s like calling on someone on the telephone - how long do you wait before you figure no one’s in, and they’re never going to pick up?

So, if you put up a message on screen saying, “Restoring products…” (or something similar), you need a function on a timeout that takes down that message (after say 10 seconds), and replace it with another one saying, “No products to restore”.

That timing is down to your judgement.  Remember that some people may be using your app where there’s no WiFi and a very poor mobile signal.

(This is also slightly complicated by the fact that a large section of the general public, who haven’t closely read terms and conditions etc., believe that IAPs are covered by Family Sharing.  Understandably, they can’t understand why your app ‘isn’t working’ and hanging during the restore cycle, as they attempt to restore IAPs from another account - which isn’t possible.)

Simon

PS. Another alternative is to put up a brief message saying, “Your products are being restored”, then the user keeps playing whilst your app restores their products silently in the background.  You’d still need to put up a message at some point saying there’s no message back from the App Store though.

Or a third option is to not show anything and process the transactions like they come in as if they are new. Restoring is for people who deleted the app and wants to get their purchases back. Shouldn’t your notifications “You just unlocked level’s 10-20” be enough notice of success? If they haven’t unlocked anything, life goes on.

But as Simon said, most people will use a timer to remove any “Attempting to restore” dialogs that you show.  

Rob

Do your test users have any products to restore that they’ve purchased in the past?

If they don’t, your restore() call will never receive a callback.  You send a call to restore() and just get silence in return.

Simon

To Corona

restore () allowed only for Non-Consumable and Auto-Renewable Subscription?

Consumable - No callback

Non-Renewing Subscription - No callback

Non-Consumable - OK

Auto-Renewable Subscription - OK

@happymongoose

Subscription Group

1 Week

1 Month

1 Year

I created the group as above.

I would like to use Apple’s Purchase and Restore only, without my separate server.

Question 1.

How do I determine my subscription renewal / cancellation?

Question 2.

It’s related to Question 1.

For example, after signing up for a subscription, logging out an ID from the App Store,

When I go back into the app, I think I need to check if it’s a valid user.

Do you check every time your app is activated by question 1?

restore() only makes sense for non-consumable items. Apple does not let you restore consumable items.  I’ve not worked with subscriptions, but that sounds about right too. Non-auto renewable subscriptions are like consumable items in they are one time use items. There is no need to restore them.

Rob

I found this.

https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/Subscriptions.html

How should Corona handle Expiration and Renewal, Cancellation, and Status updates?

Please help me.

When store.init() is called, any pending transactions will come in to your transaction listener function. It’s up to you on how handle and track the subscription data.

Rob

I encounter exact this problem. When NOT logged in with an Apple ID I get asked to log in. If already logged in with a testuser I just get no action at all and the screen stays as it is.

Do I have to manually stop this when the store.restore() call is not getting anything back from the transactionListener function?

Shouldn’t a store.restore() call even get into the listener without any non-consumable purchases (before)?

This bit of store functionality is counter-intuitive.

store.restore() will only call your transactionListener if there are products to restore.   If the user doesn’t have any, your transactionListener will never received a callback (ie. all it will hear is a deafening silence.)

Now, there’s an obvious problem here - how long do you wait until you decide that the App Store is never going to get back in touch?  It’s like calling on someone on the telephone - how long do you wait before you figure no one’s in, and they’re never going to pick up?

So, if you put up a message on screen saying, “Restoring products…” (or something similar), you need a function on a timeout that takes down that message (after say 10 seconds), and replace it with another one saying, “No products to restore”.

That timing is down to your judgement.  Remember that some people may be using your app where there’s no WiFi and a very poor mobile signal.

(This is also slightly complicated by the fact that a large section of the general public, who haven’t closely read terms and conditions etc., believe that IAPs are covered by Family Sharing.  Understandably, they can’t understand why your app ‘isn’t working’ and hanging during the restore cycle, as they attempt to restore IAPs from another account - which isn’t possible.)

Simon

PS. Another alternative is to put up a brief message saying, “Your products are being restored”, then the user keeps playing whilst your app restores their products silently in the background.  You’d still need to put up a message at some point saying there’s no message back from the App Store though.

Or a third option is to not show anything and process the transactions like they come in as if they are new. Restoring is for people who deleted the app and wants to get their purchases back. Shouldn’t your notifications “You just unlocked level’s 10-20” be enough notice of success? If they haven’t unlocked anything, life goes on.

But as Simon said, most people will use a timer to remove any “Attempting to restore” dialogs that you show.  

Rob