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.