Sometimes, in my iOS app subscription starts fail in production with an SKError with code 0. This code means that an "unknown or unexpected error" occurred, and in this case I display the localized description to the user. In most cases this is "Cannot connect to iTunes Store".
What are the most common reasons for this? Can I provide better suggestions to the user than "Try again"? Is this usually a problem with their Apple ID, or a network failure?
Futher, I noticed that in some cases there is an underlying error object with the error domain ASDServerErrorDomain. Is this error domain documented somewhere? I couldn't find any information about this. I have seen multiple cases where this underlying error had the code 3532, and the NSLocalizedDescription is:
What's the recommended way to react to this error? What should I display to the user? The localized description of the SKError itself is in this case
What are the most common reasons for this? Can I provide better suggestions to the user than "Try again"? Is this usually a problem with their Apple ID, or a network failure?
Futher, I noticed that in some cases there is an underlying error object with the error domain ASDServerErrorDomain. Is this error domain documented somewhere? I couldn't find any information about this. I have seen multiple cases where this underlying error had the code 3532, and the NSLocalizedDescription is:
I find that surprising because (1) I would expect that StoreKit simply treats this as a successful "purchased" transaction (I think this case is mentioned on some WWDC talk) instead of throwing an error and (2) there is no documented way to detect this case and unlock the subscribed content for the user.You’re currently subscribed to this.
What's the recommended way to react to this error? What should I display to the user? The localized description of the SKError itself is in this case
which is not helpful at all.An unknown error occurred