I’m beginning to implement In App Purchases and I’ve been researching the docs. Something I don’t really see is what happens in the case of an error (mainly if the internet gets disconnected or the connection is too poor).
I want to set some kind of timeout but I’m not sure how. I don’t see any functions in the store API to stop waiting for requests. For example, I want to make use of store.loadProducts() and timeout within 10 seconds if I haven’t received anything. How would I accomplish this?
I would also like to do the same thing for purchases. If the purchase hasn’t gone through in a certain amount of time I want to cancel the process and have them try again later.
If anybody has some working code that shows how you’ve implemented timeouts and other error handling I would be grateful!