SSErrorDomain, SKReceiptRefreshRequest, SKRequest did fail with error, code = 16, code = 110

与世无争的帅哥 提交于 2019-12-09 11:37:00

问题


iOS 9.2.1, Xcode 7.2.1, ARC enabled

I am using the following method to check for failures of SKProductsRequest and SKReceiptRefreshRequest:

- (void)request:(SKRequest *)request didFailWithError:(NSError *)error
{
    NSLog(@"error: %@", error);
}

My question is specifically about SKReceiptRefreshRequest. I am testing for two conditions, (1) when the user cancels the sign-in to iTunes Store for the receipt request and (2) when the user tries to sign-in and there is no connection (Air Plane Mode).

I get the following errors:

When there is no connection:

Error Domain=SSErrorDomain Code=110 "Cannot connect to iTunes Store" UserInfo={NSLocalizedDescription=Cannot connect to iTunes Store, NSUnderlyingError=0x13c76d680 {Error Domain=NSURLErrorDomain Code=-1009 "Cannot connect to iTunes Store" UserInfo={NSLocalizedDescription=Cannot connect to iTunes Store, NSErrorFailingURLStringKey=

{ your product ids and corresponding URIs here }

, _kCFStreamErrorCodeKey=8, _kCFStreamErrorDomainKey=12, NSLocalizedDescription=The Internet connection appears to be offline.}}}

When the user taps cancel:

Error Domain=SSErrorDomain Code=16 "Cannot connect to iTunes Store" UserInfo={NSLocalizedDescription=Cannot connect to iTunes Store, NSUnderlyingError=0x13c6ac7b0 {Error Domain=AKAuthenticationError Code=-7003 "(null)"}}

I have used the raw error codes to differentiate between the errors and trigger the appropriate UI events to handle the error state. But I've been doing it without understanding what the underlying error is.

The common error domain between the two is SSErrorDomain.

Could someone please elaborate on what the SSErrorDomain is and what framework it belongs to? Also, could you provide some helpful documentation about all of the possible error codes for this domain?

Thanks in advance!

来源:https://stackoverflow.com/questions/35851069/sserrordomain-skreceiptrefreshrequest-skrequest-did-fail-with-error-code-16

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!