This has nothing to do with AFNetworking, code=-1012 is the NSURLError error message provided by the system. There is a comparison table http://blog.csdn.net/yesjava/article/details/8056681. NSURLErrorUserCancelledAuthentication = -1012. User cancels verification. You will know the reason after searching.
1. The DNS servers for wireless access and cellular access are different. Looking at the error message, the server you accessed has SSL enabled and uses a self-generated certificate. 2. I have not encountered similar problems with AFNetworking 2.x. .x version: 2.1 Code modification:
This has nothing to do with AFNetworking, code=-1012 is the NSURLError error message provided by the system. There is a comparison table http://blog.csdn.net/yesjava/article/details/8056681.
NSURLErrorUserCancelledAuthentication = -1012. User cancels verification.
You will know the reason after searching.
1. The DNS servers for wireless access and cellular access are different. Looking at the error message, the server you accessed has SSL enabled and uses a self-generated certificate.
2. I have not encountered similar problems with AFNetworking 2.x. .x version:
2.1 Code modification:
2.2 Info.plist Join ATS:
3. Code example: