kCFErrorDomainCFNetwork Code=-1200

When we use Apple's in-app purchase, we will receive the callback of SKPaymentTransactionStateFailed in the paymentQueue:updatedTransactions: method, and print transaction.error.userInfod to get the following information:

{ NSLocalizedDescription = "An SSL error occurred and a secure connection to this server could not be established."; NSUnderlyingError = "Error Domain=kCFErrorDomainCFNetwork Code=-1200 "Failed to complete the operation. (kCFErrorDomainCFNetwork error -1200.)" UserInfo={NSLocalizedDescription=Failed to complete operation. (kCFErrorDomainCFNetwork error -1200.)

After switching to another network, you can pay normally, how can I solve this situation, thank you

We also receive similar complaints from our users every now and then. From our own investigation, this is usually due to unreliable network connections between the user and Apple's IAP services.

Most of our users are based in China, but we found Apple's IAP endpoints (e.g. p32-buy.itunes.apple.com) all resolve to IP addresses based in the US. Network connections are usually slow and unreliable between servers abroad and users from within the country. Correct me if I'm wrong, but we don't think Apple has any edge servers in China for IAP.

After switching to another network, you can pay normally

This is also what our users told us. If they fail to make an In-App Purchase using cellular network, switching to Wi-Fi usually works, and vice versa.

Hopefully someone at Apple would be able to escalate this and see what they can do on their end.

kCFErrorDomainCFNetwork Code=-1200
 
 
Q