Because the App used HTTPS network requests from the beginning, it originally adopted the AFNetworking2.0 self-signed certificate method, and made relevant settings in the project’s info.plist to skip Apple’s HTTPS and use its own server’s HTTPS. , is achievable.
After upgrading to Xcode8, I encountered several problems when using Xcode8 to adapt iOS10 HTTPS today:
1.ATS makes relevant settings in the info.plist file
2. The network request framework uses AFNetworking3.0, and for the authentication of the HTTPS certificate, the system root certificate is used for verification,
` (AFSecurityPolicy *)customSecurityPolicy {
/**** SSL Pinning ****/
AFSecurityPolicy *securityPolicy = [AFSecurityPolicy defaultPolicy];
/**** SSL Pinning ****/
return securityPolicy;
}
[_manager setSecurityPolicy:[Public customSecurityPolicy]];
`
I think I have already done all the HTTPS settings in the code, but now the program reports an error when making an HTTPS network request:
28739: CFNetwork internal error (0xc01a:/BuildRoot/Library/Caches/com.apple.xbs/Sources/CFNetwork_Sim/CFNetwork-758.3.15/ProjectRuntime/CFNetworkInternal.h:479)
Do you know what’s going on? Thanks for the advice.