Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS IAP Error Domain=SKErrorDomain Code=2 in Production

I am seeing quite a few failed in-app purchases with the error description reading Error Domain=SKErrorDomain Code=2 "Cannot connect to iTunes Store" UserInfo=<some hex value> {NSLocalizedDescription=Cannot connect to iTunes Store}.

What causes this? Every answer I've found on SO is several years old and says this error relates to sandbox issues or trying to buy an IAP in the simulator.

like image 836
Dave Avatar asked Oct 31 '22 22:10

Dave


1 Answers

According to my own experience this error (Error Domain=SKErrorDomain Code=2) comes when a user cancels the In-App-Purchase in the system confirmation dialog. So this is not an error, per se. The cancelation is falsely reported as error, would be of cause better if StoreKit reported it as a cancelation instead.

like image 98
Denis Krivitski Avatar answered Nov 14 '22 23:11

Denis Krivitski