GrabDuck

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

:

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!